Update campaign budget and duration
PATCH/v1/campaigns/:campaignId/budget
Updates campaign budget, duration, or both. Null or absent properties keep current values. Not available for bonus credit campaigns.
| OAuth scope | Access token type |
|---|---|
employer.advertising.campaign | Access token that represents an employer. |
Request
Path Parameters
Campaign ID.
- application/json
Body
required
Be sure to include the Content-Type: application/json header in the request.
If set, the campaign has a single budget for the whole duration of the campaign. You must always specify either budgetOnetimeLimit or budgetMonthlyLimit, but not both.
The budget appears in the employer account's currency. Sponsored Jobs API parses, stores, and returns the value as an exact decimal fraction, not as a floating point number.
Monthly recurring budget for the campaign. The end date is optional for campaigns with a monthly recurring budget. You must always specify exactly one budgetOnetimeLimit or budgetMonthlyLimit.
The budget appears in the employer account's currency. Sponsored Jobs API parses, stores, and returns the value as an exact decimal fraction, not as a floating point number.
Possible values: [startNowProratedAmount, startNowFullAmount, startNextMonthFullAmount]
Along with budgetMonthlyLimit and a campaign start date other than the first day of the month, defines the behavior of the first month's budget. Value is:
| Value | First month budget |
|---|---|
startNowFullAmount
| Full monthly budget. |
startNowProratedAmount | Proportional to days in month after start date. |
startNextMonthFullAmount
| No budget. |
This table shows the budget for the first month and the subsequent month when the monthly budget is 900 USD, the start date is June 11, and budgetFirstMonthBehavior is set to one of these values:
| Value | June 11 to 30 | July 1 to 31 |
|---|---|---|
startNowFullAmount
| 900 USD | 900 USD |
startNowProratedAmount
| 600 USD | 900 USD |
startNextMonthFullAmount
| 0 USD | 900 USD |
Date when the campaign starts sponsoring jobs, in ISO 8601 YYYY-MM-DD format. Default is current date.
The campaign starts sponsoring jobs at the start of the specified day in US Central Time (CT, US/Central). The start date must be on or after the current date in CT. For example, if the startDate is 2021-01-15, the campaign starts sponsoring on January 15, 2021 at 0:00 AM CT. If the start date is not provided or is the current date, the campaign starts sponsoring immediately.
Once the campaign is active and spending, you cannot update its startDate. If you wish to temporarily pause a campaign, set its status to PAUSED.
Date before when the campaign must stop sponsoring jobs, even if it has remaining unspent budget. Follows the ISO 8601 YYYY-MM-DD format.
A campaign with a one-time budget (budgetOnetimeLimit) must always have either a fixedEndDate or a targetEndDate, but not both.
A campaign with a monthly recurring budget (budgetMonthlyLimit) may optionally have a fixedEndDate. Monthly recurring campaigns default to sponsoring jobs until you manually pause or delete the campaign. These are called "evergreen" campaigns. To stop the campaign at the start of a specified day, specify fixedEndDate.
The campaign stops sponsoring jobs at the start of the specified day in US Central Time (CT, US/Central). The fixedEndDate must be at least one day after the current date in CT, or the startDate of the campaign, if the campaign has one. For example, if the fixed end date is 2021-06-20, the campaign stops on June 20, 2021 at 0:00 AM CT.
Date before when the campaign should stop sponsoring jobs, though it can continue sponsoring past the specified date if it has not spent its budget yet. Follows the ISO 8601 YYYY-MM-DD format.
A campaign with a one-time budget (budgetOnetimeLimit) must always have either a fixedEndDate or a targetEndDate, but not both. A campaign with a monthly recurring budget (budgetMonthlyLimit) cannot have a targetEndDate, only a fixedEndDate or no end date.
The campaign targets the start of the specified day in US Central Time (CT, US/Central). The target end date must be at least one day after the current date in CT, or the startDate of the campaign, if the campaign has one. For example, if the target end date is 2021-06-20, the campaign targets June 20, 2021 at 0:00 AM CT.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
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
Campaign ID. of the updated campaign
{ "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": "cda7fa7645b613d5" }}{ "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/bceed88523d89731" }, { "rel": "Traffic Statistics", "href": "/v1/campaigns/bceed88523d89731/stats" } ] }, "data": { "campaignId": "bceed88523d89731" }}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)
- Updating start date after campaign is active
- Multiple types of end date
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": "startDate: Cannot update the start date for this campaign." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": [ { "rel": "up", "href": "/v1/campaigns" } ] }, "data": null}{ "meta": { "status": 400, "errors": [ { "type": "INVALID_REQUEST", "description": "targetEndDate: You can only have one end date type, either fixed or target." }, { "type": "INVALID_REQUEST", "description": "fixedEndDate: You can only have one end date type, either fixed or target." } ], "rootLocation": "https://apis.indeed.com/ads", "perPage": null, "links": [ { "rel": "up", "href": "/v1/campaigns" } ] }, "data": null}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}The access token was valid but can't 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. 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 does not exist, or belongs to a different employer. Be sure to use an access token that represents the employer. See Get access token that represents employer that owns the requested campaign.
- 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. The problem is sometimes temporary. The same request can 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.
- 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}