Update general campaign information
PATCH/v1/campaigns/:campaignId
Updates the basic properties of a sponsored jobs campaign.
| OAuth scope | Access token type |
|---|---|
employer.advertising.campaign | Access token that represents an employer. See Get access token that represents employer. |
Request
Path Parameters
Campaign ID of the campaign to update.
- application/json
Body
required
Request body must be a JSON object that describes the changes to make to the campaign. Be sure to include the Content-Type: application/json header in the request.
Any fields that are null or absent from the request keep their current value. However, if you change jobsToInclude to ALL, any existing values of jobsQuery, jobsTitle, jobsCompany, jobsLocation and jobsLocationRadius are cleared.
You can add an objective to a campaign that doesn't have one, and change the target value of an objective. However, you cannot remove an objective or change its objectiveType.
ALL- Campaign sponsors all the jobs in the job source. ThejobsQuery,jobsTitle,jobsCompany,jobsLocation, andjobsLocationRadiusfields' values are ignored, and any existing values are cleared.QUERY- Campaign sponsors a subset of jobs that match the criteria defined byjobsQuery,jobsTitle,jobsCompany,jobsLocation, andjobsLocationRadiusfields. If more than one field is specified, only jobs that match all the criteria are sponsored.BALANCE: Get the most total applications for your budget, while balancing across jobs.MAXIMUM: Get the most total applications for your budget, without balancing clicks across jobs.QUICK: Five day campaign with higher budget for faster results. Sponsored Jobs API does not currently support creating or modifying campaigns with this objective. However, the Sponsored Jobs API does allow for retrieving campaign reports for campaigns with this objective type (these campaigns would have been created using Indeed for Employers).TARGET_APPLICATIONS: Aim to reach the number of applications specified bytarget. When the target number of applications is hit, spend on these jobs is significantly reduced and allocated elsewhere.TARGET_COST_PER_APPLICATION: Aim to keep the cost per application below the number specified bytarget.SCHEDULED_INTERVIEWS: Send screened candidates straight to interview. Aim to reach the number of interviews specified bytarget. This objective requires an active Indeed Hiring Platform subscription, and should only be used when the customer is prepared to create hiring events for the included jobs.- BALANCE
- MAXIMUM
- QUICK
- TARGET_APPLICATIONS
- TARGET_COST_PER_APPLICATION
- SCHEDULED_INTERVIEWS
Possible values: non-empty and <= 250 characters
Campaign name. Use to identify the campaign later. The name must be unique within your employer account.
Possible values: <= 255 characters
Click-tracking token appended to the job URL on sponsored clicks. Allows you to identify that the click is from Indeed, and identify the campaign that sponsored the click.
Possible values: [ACTIVE, DELETED, PAUSED]
Campaign status. Set to PAUSED or DELETED to stop the campaign from sponsoring jobs. If DELETED, the campaign is additionally hidden from the default view in the campaign management portal.
Possible values: [ALL, QUERY]
Note: If
jobsToIncludeisQUERYwith no criteria, all jobs are sponsored. This will error in future versions. Specify at least one criterion, or setjobsToIncludetoALL. For bonus credit campaigns, employers can only updatejobsQueryandjobsToInclude.
Sponsors only jobs that match these search terms. Supports boolean expressions. See Indexed jobs query format. Applies only when jobsToInclude is QUERY. For Bonus Credit campaigns, employers can only update jobsQuery and jobsToInclude.
If specified, the campaign sponsors only jobs with this job title. Applies only if jobsToInclude is QUERY.
If specified, the campaign sponsors only jobs with this hiring company. Applies only if jobsToInclude is QUERY.
If specified, the campaign sponsors only jobs at or near this location. Applies only if jobsToInclude is QUERY.
Default value: 25
Maximum distance between the job location and the location specified by jobsLocation. Valid value is 5, 10, 15, 25, 50, and 100. If the job is located in the United States or the United Kingdom, the unit is miles. Otherwise, the unit is kilometers.
objective
object
Hiring goals that the campaign intends to achieve, and makes the campaign into an objective-based campaign. The value is a JSON object with an objectiveType field specifying the campaign objective, and for some objective types, a target field identifying the specific goal metric.
For example, if the goal of the campaign is to supply 10 applications, set the objective to:
{ "objectiveType": "TARGET_APPLICATIONS", "target": 10}You can add an objective to a campaign that doesn't have one, and change the target value of an objective. However, you cannot remove an objective or change its objectiveType.
objectiveType
string
Possible values: [BALANCE, MAXIMUM, QUICK, TARGET_APPLICATIONS, TARGET_COST_PER_APPLICATION, SCHEDULED_INTERVIEWS]
The campaign objective. The available values are:
Campaigns created outside your application could use newly added objective types that aren't yet supported by your application. Your application should have fallback logic to handle unexpected objectiveType values.
any
any
any
Number of apps that the campaign should reach.
Cost per app that the campaign should stay below, in the employer account's currency. Sponsored Jobs API parses, stores and returns the value as an exact decimal fraction, not a floating point number.
Number of interviews that the campaign should reach.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Returns HTTP 200 status code on success.
- 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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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
The campaignId value in the request.
{ "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": { "campaignId": "ee4d641cab17b22c" }}{ "meta": { "status": 200, "errors": null, "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": [ { "rel": "up", "href": "/v1/campaigns" }, { "rel": "Campaign Info", "href": "/v1/campaigns/ee4d641cab17b22c" }, { "rel": "Traffic Statistics", "href": "/v1/campaigns/ee4d641cab17b22c/stats" } ] }, "data": { "campaignId": "ee4d641cab17b22c" }}A request parameter is not valid. The description field usually contains the name of the problematic parameter and a more detailed error message.
Unlike other error types, the meta.errors array may contain multiple INVALID_REQUEST errors, one for each request parameter with a problem.
- 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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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_REQUEST", "description": "Found objective with type `OBJECTIVE_BALANCE` that does not match the provided `OBJECTIVE_BUDGET` type. You cannot update an ad's objective type." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": [ { "rel": "up", "href": "/v1/campaigns" } ] }}Request did not include a valid access token:
-
The
Authorizationheader is missing or malformed. Include the access token using theBearerscheme — 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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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": "Invalid OAuth access token." } ], "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 the 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. |
NOT_EMPLOYER_ACCESS_TOKEN | This endpoint requires an access token that represents an employer. See Get access token that represents employer. That is, you must specify the employer parameter when requesting the access token. You need to do this for the majority of the Sponsored Jobs API endpoints. |
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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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": "Access token does not have permission to access this API." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": null}Requested campaign either does not exist or belongs to another employer. Be sure to use an access token that represents the employer that owns the requested campaign. See Get access token that represents employer.
- 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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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": 404, "errors": [ { "type": "RESOURCE_NOT_FOUND", "description": "Couldn't locate the requested resource." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": { "rel": "up", "href": "/v1/campaigns" } }, "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. Make sure 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[]
Any errors that prevented successful processing of the request. If there were no errors, the 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": "Failed to process the request." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": null }, "data": null}