> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get account invitation

> Get account invitation by ID



## OpenAPI

````yaml get /account-invitations/{id}
openapi: 3.1.0
info:
  title: CookieChimp API
  description: |
    API for CookieChimp.com.

    ## Request bodies

    Resource endpoints expect the resource wrapped under its own key, e.g.
    `{"category": {"name": "Analytics"}}` rather than a bare object.
    `PUT /password` wraps in `user`. Two endpoints take their body unwrapped:
    `POST /auth`, which takes `email` and `password` at the top level, and
    `POST /consent-banners/from-template`, which takes `jurisdiction_id` —
    a selector for which template to build from, not an attribute of the
    banner it creates.

    ## Response envelopes

    Listing endpoints — including `GET /groups` and `GET /accounts` — return
    `{"pagination": {...}, "data": [...]}`. `GET /banner-templates` is the
    exception: it returns `{"data": [...]}` with no pagination, being a fixed
    catalogue rather than a collection of the account's records.
    Most single-resource endpoints
    return `{"data": {...}}`; a single group or account is returned unwrapped.
    Resource-deletion endpoints return `{"message": "..."}`; `DELETE /auth`
    returns an empty object.
  version: 1.2.0
servers:
  - url: https://cookiechimp.com/api/v1
security:
  - authorization: []
paths:
  /account-invitations/{id}:
    get:
      tags:
        - Account Invitations
      summary: Get account invitation
      description: Get account invitation by ID
      operationId: getAccountInvitation
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Account invitation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInvitationResponse'
        '401':
          $ref: '#/components/responses/AccountTokenRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    id:
      name: id
      in: path
      description: ID of the resource
      required: true
      schema:
        type: string
  schemas:
    AccountInvitationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AccountInvitation'
    AccountInvitation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: Name of the user the invitation is for
        email:
          type: string
          format: email
          description: Email address of the user
        invite_url:
          type: string
          description: URL the invited user follows to accept the invitation
        roles:
          $ref: '#/components/schemas/Roles'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        invited_by:
          type:
            - object
            - 'null'
          description: >-
            The user who sent the invitation. Empty when it was created via the
            API.
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
              format: email
      example:
        id: inv123
        name: Grace Hopper
        email: newmember@cookiechimp.com
        invite_url: https://cookiechimp.com/account_invitations/inv123
        roles:
          admin: true
        created_at: '2023-01-25T09:30:20Z'
        updated_at: '2023-01-25T09:30:20Z'
        invited_by:
          id: usr123
          name: Ada Lovelace
          email: admin@example.com
    Error:
      type: object
      description: |
        The standard error envelope, used for authentication, authorization,
        pagination and not-found errors.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: integer
              message:
                type: string
      example:
        errors:
          - code: 401
            message: Invalid API Key
    Roles:
      type: object
      description: |
        Role flags for a membership. Currently `admin` is the only role, and it
        defaults to `true`.
      additionalProperties:
        type: boolean
      example:
        admin: true
  responses:
    AccountTokenRequired:
      description: |
        Missing or invalid API token, or a token that does not resolve to an
        account. Account-scoped endpoints accept an account token, or a user
        token whose user belongs to an account; partner tokens are rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: 401
                message: API key must belong to an account
    NotFound:
      description: The record does not exist, or does not belong to the caller
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: 404
                message: Record not found
    RateLimited:
      description: |
        Too many requests. The general limit is 300 requests per 5 minutes per
        API token; the auth endpoints are throttled more tightly per IP.
      headers:
        Retry-After:
          description: Seconds until the current rate-limit window resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: 429
                message: Too many requests. Please retry later.
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      description: API token obtained from the login endpoint or the dashboard

````