openapi: 3.1.0 info: title: Greenhouse Assessment Partner ActivityFeed Users API description: 'The Assessment Partner API defines the contract that assessment vendors implement so Greenhouse can list available tests, send a test to a candidate, and retrieve the candidate''s results. Endpoints are hosted by the partner (not Greenhouse) and are secured with HTTP Basic over HTTPS. Greenhouse may also receive PATCH callbacks from the partner with completed test status; otherwise it polls `test_status` hourly for up to 8 weeks. API keys must be fewer than 171 characters. ' version: 1.0.0 contact: name: Greenhouse Software url: https://www.greenhouse.com email: developers@greenhouse.io servers: - url: https://{partner_host}/{base_path} description: Partner-hosted endpoint variables: partner_host: default: partner.example.com base_path: default: greenhouse-assessment security: - BasicAuth: [] tags: - name: Users description: Inspect the current authenticated user. paths: /current_user: get: tags: - Users summary: Retrieve Current Partner User operationId: getCurrentPartnerUser parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: Current user. content: application/json: schema: type: object properties: id: type: integer name: type: string email: type: string format: email /users: get: tags: - Users summary: List Users operationId: listUsers parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' - name: email in: query schema: type: string responses: '200': description: Users. content: application/json: schema: type: array items: $ref: '#/components/schemas/User' 4XX: $ref: '#/components/responses/ErrorResponse' post: tags: - Users summary: Create User operationId: createUser parameters: - $ref: '#/components/parameters/OnBehalfOf_2' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '201': description: Created. 4XX: $ref: '#/components/responses/ErrorResponse' /users/{id}: parameters: - $ref: '#/components/parameters/Id' get: tags: - Users summary: Retrieve User operationId: getUser responses: '200': description: User. content: application/json: schema: $ref: '#/components/schemas/User' 4XX: $ref: '#/components/responses/ErrorResponse' patch: tags: - Users summary: Update User operationId: updateUser parameters: - $ref: '#/components/parameters/OnBehalfOf_2' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: Updated. 4XX: $ref: '#/components/responses/ErrorResponse' /users/{id}/email_addresses: post: tags: - Users summary: Add User Email operationId: addUserEmail parameters: - $ref: '#/components/parameters/Id' - $ref: '#/components/parameters/OnBehalfOf_2' requestBody: required: true content: application/json: schema: type: object required: - email properties: email: type: string format: email primary: type: boolean responses: '201': description: Added. 4XX: $ref: '#/components/responses/ErrorResponse' components: parameters: Id: name: id in: path required: true schema: type: integer PerPage: name: per_page in: query description: Default 100, max 500. schema: type: integer default: 100 maximum: 500 OnBehalfOf_2: name: On-Behalf-Of in: header required: false description: The ID of the Greenhouse user the request is being made on behalf of. schema: type: integer OnBehalfOf: name: On-Behalf-Of in: header required: true description: Email of the Greenhouse user the request is made on behalf of (Basic auth) or implied from the OAuth token. schema: type: string format: email Page: name: page in: query schema: type: integer default: 1 responses: ErrorResponse: description: Error response. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: User: type: object properties: id: type: integer first_name: type: string last_name: type: string name: type: string primary_email_address: type: string format: email emails: type: array items: type: string format: email employee_id: type: string nullable: true site_admin: type: boolean disabled: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time linked_candidate_ids: type: array items: type: integer Error: type: object properties: message: type: string errors: type: array items: type: object properties: field: type: string message: type: string securitySchemes: BasicAuth: type: http scheme: basic description: HTTP Basic; the API key is Base64-encoded and used as the username (key must be <171 chars).