We’ve made the difficult decision to sunset Hire by Google on September 1, 2020. Learn more.

Method: tenants.registrations.create

Registrations expire 7 days after their creation. The created registration resource will reflect that expiration time in the expireTime field.

Due to the expiration you need to renew registrations at least every 7 days or else you will stop receiving notifications. We recommend renewing once per day. To renew an existing registration, call the create endpoint again using the same notificationTypes, pubsubTopic and credentials.

For now this endpoint can only be called using credentials for a Hire HR Admin.

Note that any value specified for the expireTime or name fields will be ignored.

While Hire may validate the pubsubTopic and return errors on a best effort basis, it is the caller's responsibility to ensure that it exists and that Hire has permission to publish to it.

This method may return the following error codes:

  • PERMISSION_DENIED if:
    • the authenticated user is not a Hire HR Admin; or
    • the credential provided does not include the appropriate scope for the requested notificationTypes; or
    • another access error is encountered.
  • INVALID_ARGUMENT if:
    • no pubsubTopic is specified, or the specified pubsubTopic is not valid; or
    • no notificationTypes is specified, or the specified notificationTypes is not valid.
  • NOT_FOUND if:
    • the specified pubsubTopic cannot be located, or Hire has not been granted permission to publish to it.

HTTP request

POST https://hire.googleapis.com/v1alpha1/{parent=tenants/*}/registrations

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the tenant to list custom field spec on. We accept "my_tenant" as a valid tenant if the account only has access to one tenant. A valid parent would be "tenants/my_tenant".

Request body

The request body contains data with the following structure:

JSON representation
{
  "registration": {
    object (Registration)
  }
}
Fields
registration

object (Registration)

Required. The Registration to create.

Response body

If successful, the response body contains a newly created instance of Registration.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/hire.application.readonly
  • https://www.googleapis.com/auth/hire.application.readwrite

For more information, see the OAuth 2.0 Overview.