Create example employer
Create and verify an example employer on Indeed.
Before you begin
- 1.Become an Indeed partner and, for Indeed PLUS only, receive an
employerIdTypefrom Indeed. - 2.Get a 2-legged access token.
When you call the Indeed PLUS APIs, initiate a timeout after 5,000 milliseconds.
API steps
1. Create an employer
Call the patchEmployer mutation with employerIdType, which Indeed provides for Indeed PLUS only:
mutation PatchEmployerExample($employerIdType: String!) { patchEmployer(input: { id: { type: $employerIdType, id: "1" } employerName: "Partner Test Company" employerAttributes: { employerType: JURIDICAL_PERSON countrySpecificAttributes: { country: "JP", taxId: "1234567890123" } localeSpecificAttributes: { country: "JP" language: "ja" isGlobalDefault: true description: "Describe your employer organization" headquarterAddress: "東京都千代田区丸の内1-9-2" leader: { name: "Sample CEO name" } } } }) { attributeUpdated }}The snippet takes this parameter:
{ "employerIdType": "<employerIdType>"}Replace <employerIdType> with your ID.
This curl command sends the patchEmployer mutation and headers to https://apis.indeed.com/graphql.
curl -X POST \ -L 'https://apis.indeed.com/graphql' \ -H 'Authorization: Bearer <access_token>' \ -H 'Content-Type: application/json' \ -d '{"query":"mutation PatchEmployerExample($employerIdType: String!) {\n\tpatchEmployer(\n\t\tinput: {\n\t\t\tid: { type: $employerIdType, id: \"1\" }\n\t\t\temployerName: \"Partner Test Company\"\n\t\t\temployerAttributes: {\n\t\t\t\temployerType: JURIDICAL_PERSON\n\t\t\t\tcountrySpecificAttributes: { country: \"JP\", taxId: \"1234567890123\" }\n\t\t\t\tlocaleSpecificAttributes: {\n\t\t\t\t\tcountry: \"JP\"\n\t\t\t\t\tlanguage: \"ja\"\n\t\t\t\t\tisGlobalDefault: true\n\t\t\t\t\tdescription: \"Describe your employer organization\"\n\t\t\t\t\theadquarterAddress: \"東京都千代田区丸の内1-9-2\"\n\t\t\t\t\tleader: { name: \"Sample CEO name\" }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t) {\n\t\tattributeUpdated\n\t}\n}\n","operationName":"PatchEmployerExample","variables":{"employerIdType": "<employerIdType>"}}'Request headers:
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <token> | Use this header to authenticate with the server and access protected resources. Pass the access token in this header with the Bearer authentication scheme. For the oauth/v2/tokens endpoint, use the basic authentication scheme instead of passing client_id and client_secret in the request body. See Get an access token, Authorization header (opens in a new window), and Basic authentication scheme. |
Content-Type | application/json | The media type (opens in a new window) of the resource. See Content-Type header (opens in a new window). |
The --data parameter specifies the GraphQL query. Replace <employerIdType> with your ID.
To send GraphQL requests with Insomnia (opens in a new window), import the curl command. See Import Data (opens in a new window) in the Insomnia documentation.
A successful response returns the PatchEmployerPayload object:
{ "data": { "patchEmployer": { "attributeUpdated": true } }}2. Create more employers
Change id.id (for example, from 1 to 2).
3. Update an employer
Change any attribute (for example, headquarterAddress).
See also
Guides
- Create example job — Create and verify an example job on Indeed.
- Troubleshoot GraphQL errors — Diagnose GraphQL errors from the API.
GraphQL API reference
patchEmployer— Creates or updates an employer.