openapi: 3.0.3 info: title: Courier Audiences User Profiles API description: 'Courier is notification infrastructure that orchestrates transactional and product messaging across email, SMS, push, chat, and an in-app inbox from a single REST API. This document models the primary public endpoints under the base URL https://api.courier.com: sending notifications (Send), inspecting sent messages, managing lists, user profiles, preferences, device tokens, notification templates, brands, automations, audiences, tenants, bulk jobs, audit events, and translations. All requests are authenticated with a Bearer API key. Endpoint paths are grounded in Courier''s published API reference; request and response bodies are modeled and simplified.' version: 2024-01 contact: name: Courier url: https://www.courier.com x-endpoint-confidence: Paths and methods are grounded in the Courier API reference (https://www.courier.com/docs/reference). Schemas are modeled, not exhaustive. servers: - url: https://api.courier.com description: Courier production API security: - bearerAuth: [] tags: - name: User Profiles description: Recipient profiles keyed by your user id. paths: /profiles/{user_id}: parameters: - $ref: '#/components/parameters/UserId' get: operationId: getProfile tags: - User Profiles summary: Get a profile responses: '200': description: The requested profile. content: application/json: schema: $ref: '#/components/schemas/Profile' '404': $ref: '#/components/responses/NotFound' post: operationId: createProfile tags: - User Profiles summary: Create or merge a profile requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProfileInput' responses: '200': description: The created profile. content: application/json: schema: $ref: '#/components/schemas/Profile' put: operationId: replaceProfile tags: - User Profiles summary: Replace a profile requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProfileInput' responses: '200': description: The replaced profile. content: application/json: schema: $ref: '#/components/schemas/Profile' patch: operationId: patchProfile tags: - User Profiles summary: Merge/patch a profile requestBody: required: true content: application/json: schema: type: object properties: patch: type: array items: type: object additionalProperties: true responses: '200': description: The patched profile. content: application/json: schema: $ref: '#/components/schemas/Profile' delete: operationId: deleteProfile tags: - User Profiles summary: Delete a profile responses: '204': description: The profile was deleted. /profiles/{user_id}/lists: parameters: - $ref: '#/components/parameters/UserId' get: operationId: getProfileLists tags: - User Profiles summary: Get the lists a user is subscribed to responses: '200': description: The subscription lists for the user. content: application/json: schema: type: object properties: paging: $ref: '#/components/schemas/Paging' results: type: array items: $ref: '#/components/schemas/List' components: schemas: List: allOf: - $ref: '#/components/schemas/ListInput' - type: object properties: id: type: string created: type: integer updated: type: integer ListInput: type: object required: - name properties: name: type: string Error: type: object properties: message: type: string type: type: string Paging: type: object properties: cursor: type: string more: type: boolean Profile: type: object properties: profile: type: object additionalProperties: true ProfileInput: type: object properties: profile: type: object additionalProperties: true responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: UserId: name: user_id in: path required: true description: Your application's user id for the recipient. schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: 'Courier API key passed as `Authorization: Bearer `. Keys are found in the Courier settings under API Keys and are environment scoped (test vs production).'