Create advertiser subaccount
POST/v1/subaccounts
Creates advertiser subaccount.
Set the content type to application/json.
| OAuth scope | Access token type |
|---|---|
employer.advertising.subaccount | Access token without the |
Request
- application/json
Body
required
Email for the subaccount.
ISO 4217 currency code for the subaccount's campaign budgets and billing.
Must match the root advertiser account's currency.
Two-letter language code used for the subaccount.
Number of employees.
Valid values are: 1-49, 50-149, 150-249, 250-499, 500-749, 750-999, 1000+
If you omit the company name, the company name of the master account is used and set as the company name for the newly created subaccount.
Responses
- 200
- 400
- 401
- 403
- 500
Created
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Array [
-
up: The related resource is a collection that contains the requested resource, or an entity that the requested resource is attached to. -
next: The next page of entries in a paginated result. -
prev: The previous page of entries in a paginated result. ]
meta
object
Response-related metadata.
HTTP status code of the response.
errors
object[]
Errors that prevented the request from being processed successfully.
If there are no errors, this value is null.
Name of the error.
Human-readable description of the problem.
Base URL of the Sponsored Jobs API.
For endpoints that return paginated results, the effective maximum number of entries returned on one page.
The value may be smaller than the maximum you requested with the perPage parameter.
If the endpoint returns a single result or doesn't paginate, the value is null.
links
object[]
Resources related to the requested resource.
The relationship between the requested resource and the related resource. These values are commonly used:
However, the value may also be an arbitrary string describing the relationship, such as Campaign Info.
Endpoint URL of the related resource.
Can contain query string parameters.
To get the complete URL, append the href to rootLocation.
data
object
Deprecated. Legacy employer ID. Use employerId instead.
Name of the subaccount.
Email for the subaccount.
ISO 4217 currency code for the subaccount's campaign budgets and billing.
Must match the root advertiser account's currency.
{ "meta": { "status": 200, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": 25, "links": [ { "rel": "next", "href": "/v1/campaigns/3141592653589793" } ] }, "data": { "company": "Indeed", "email": "admin@indeed.com", "currencyCode": "USD", "employerId": "68e7a7a549a5ce1e499c72a424253ca7" }}{ "meta": { "status": 200, "errors": null, "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": { "id": "3141592653589793", "company": "Indeed", "email": "admin@indeed.com", "currencyCode": "USD", "employerId": "68e7a7a549a5ce1e499c72a424253ca7" }}A request parameter is invalid.
description usually identifies the parameter and explains the error.
meta.errors can include multiple INVALID_REQUEST errors, one per invalid parameter.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Array [
-
up: The related resource is a collection that contains the requested resource, or an entity that the requested resource is attached to. -
next: The next page of entries in a paginated result. -
prev: The previous page of entries in a paginated result. ]
meta
object
Response-related metadata.
HTTP status code of the response.
errors
object[]
Errors that prevented the request from being processed successfully.
If there are no errors, this value is null.
Name of the error.
Human-readable description of the problem.
Base URL of the Sponsored Jobs API.
For endpoints that return paginated results, the effective maximum number of entries returned on one page.
The value may be smaller than the maximum you requested with the perPage parameter.
If the endpoint returns a single result or doesn't paginate, the value is null.
links
object[]
Resources related to the requested resource.
The relationship between the requested resource and the related resource. These values are commonly used:
However, the value may also be an arbitrary string describing the relationship, such as Campaign Info.
Endpoint URL of the related resource.
Can contain query string parameters.
To get the complete URL, append the href to rootLocation.
{ "meta": { "status": 200, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": 25, "links": [ { "rel": "next", "href": "/v1/campaigns/3141592653589793" } ] }, "data": null}{ "meta": { "status": 400, "errors": [ { "type": "INVALID_LANGUAGE", "description": "<p>Invalid language</p>" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": [ { "rel": "up", "href": "/v1/subaccounts" } ] }, "data": null}Request did not include a valid access token:
The @@PH0@@ header is missing or malformed. Include the access token using the
Bearerscheme — for example,Authorization: Bearer XYZ.The access token is malformed. When building requests manually, check that you copied the token without missing or extra characters at the start or end.
The access token has expired. Tokens expire after one hour (3,600 seconds).
Get a new token using your client credentials (2-legged OAuth) or a refresh token (3-legged OAuth).
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Array [
-
up: The related resource is a collection that contains the requested resource, or an entity that the requested resource is attached to. -
next: The next page of entries in a paginated result. -
prev: The previous page of entries in a paginated result. ]
meta
object
Response-related metadata.
HTTP status code of the response.
errors
object[]
Errors that prevented the request from being processed successfully.
If there are no errors, this value is null.
Name of the error.
Human-readable description of the problem.
Base URL of the Sponsored Jobs API.
For endpoints that return paginated results, the effective maximum number of entries returned on one page.
The value may be smaller than the maximum you requested with the perPage parameter.
If the endpoint returns a single result or doesn't paginate, the value is null.
links
object[]
Resources related to the requested resource.
The relationship between the requested resource and the related resource. These values are commonly used:
However, the value may also be an arbitrary string describing the relationship, such as Campaign Info.
Endpoint URL of the related resource.
Can contain query string parameters.
To get the complete URL, append the href to rootLocation.
{ "meta": { "status": 200, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": 25, "links": [ { "rel": "next", "href": "/v1/campaigns/3141592653589793" } ] }, "data": null}{ "meta": { "status": 401, "errors": [ { "type": "INVALID_TOKEN", "description": "<p>Invalid OAuth access token.</p>" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": null}Valid access token that cannot be used with this API. Inspect the error returned in meta.errors for details.
| Error type | Meaning and common causes |
|---|---|
INSUFFICIENT_SCOPE | The access token does not have the OAuth v2 token scope required for this API endpoint. For common causes, see FAQ and troubleshooting. |
EMPLOYER_ACCESS_TOKEN_NOT_ALLOWED | This API endpoint can't be accessed with an access token representing an employer. This might be because:
|
LEGACY_ACCESS_TOKEN_NOT_ALLOWED | Sponsored Jobs API no longer supports access tokens that you get through legacy OAuth endpoints. For updated endpoints, see Integrate with Indeed and call APIs. |
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Array [
-
up: The related resource is a collection that contains the requested resource, or an entity that the requested resource is attached to. -
next: The next page of entries in a paginated result. -
prev: The previous page of entries in a paginated result. ]
meta
object
Response-related metadata.
HTTP status code of the response.
errors
object[]
Errors that prevented the request from being processed successfully.
If there are no errors, this value is null.
Name of the error.
Human-readable description of the problem.
Base URL of the Sponsored Jobs API.
For endpoints that return paginated results, the effective maximum number of entries returned on one page.
The value may be smaller than the maximum you requested with the perPage parameter.
If the endpoint returns a single result or doesn't paginate, the value is null.
links
object[]
Resources related to the requested resource.
The relationship between the requested resource and the related resource. These values are commonly used:
However, the value may also be an arbitrary string describing the relationship, such as Campaign Info.
Endpoint URL of the related resource.
Can contain query string parameters.
To get the complete URL, append the href to rootLocation.
{ "meta": { "status": 200, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": 25, "links": [ { "rel": "next", "href": "/v1/campaigns/3141592653589793" } ] }, "data": null}{ "meta": { "status": 403, "errors": [ { "type": "INSUFFICIENT_SCOPE", "description": "<p>Access token does not have permission to access this API.</p>" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": null}Unexpected error occurred.
The problem is sometimes temporary and the exact same request may succeed after retrying.
If retrying the request does not help, a problem with parsing the request might have occurred.
Verify that all the required parameters are present and that all parameters are correctly formatted.
If you use an access token obtained with client credentials grant type (2-legged OAuth) with the legacy Sponsored Jobs API endpoint, the INTERNAL_SERVER_ERROR error occurs.
Be sure to use the latest base URL (
https://apis.indeed.com/ads).- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Array [
-
up: The related resource is a collection that contains the requested resource, or an entity that the requested resource is attached to. -
next: The next page of entries in a paginated result. -
prev: The previous page of entries in a paginated result. ]
meta
object
Response-related metadata.
HTTP status code of the response.
errors
object[]
Errors that prevented the request from being processed successfully.
If there are no errors, this value is null.
Name of the error.
Human-readable description of the problem.
Base URL of the Sponsored Jobs API.
For endpoints that return paginated results, the effective maximum number of entries returned on one page.
The value may be smaller than the maximum you requested with the perPage parameter.
If the endpoint returns a single result or doesn't paginate, the value is null.
links
object[]
Resources related to the requested resource.
The relationship between the requested resource and the related resource. These values are commonly used:
However, the value may also be an arbitrary string describing the relationship, such as Campaign Info.
Endpoint URL of the related resource.
Can contain query string parameters.
To get the complete URL, append the href to rootLocation.
{ "meta": { "status": 200, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": 25, "links": [ { "rel": "next", "href": "/v1/campaigns/3141592653589793" } ] }, "data": null}{ "meta": { "status": 500, "errors": [ { "type": "INTERNAL_SERVER_ERROR", "description": "<p>Failed to process the request.</p>" } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": null}