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

# Add Campaign Member

> Add one member to a custom campaign by email. Same rules as `POST /v2/campaigns/{campaignId}/members/batch`: the contact is created if it does not exist, adding is an idempotent upsert, and status progression is forward-only for existing members.



## OpenAPI

````yaml /openapi.json post /v2/campaigns/{campaignId}/members
openapi: 3.1.0
info:
  title: Conversion API
  version: 2.0.0
  description: >-
    The Conversion API lets you programmatically manage contacts, track custom
    events, and manage their associated data.
servers:
  - url: https://pub-api.conversion.ai/api
security:
  - apiKey: []
paths:
  /v2/campaigns/{campaignId}/members:
    post:
      summary: Add Campaign Member
      description: >-
        Add one member to a custom campaign by email. Same rules as `POST
        /v2/campaigns/{campaignId}/members/batch`: the contact is created if it
        does not exist, adding is an idempotent upsert, and status progression
        is forward-only for existing members.
      operationId: addCampaignMember
      parameters:
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The Conversion campaign id, as returned by `GET /v2/campaigns`.
          examples:
            campaign:
              value: b7c8d9e0-f1a2-3456-bcde-f01234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: >-
                    The member's email address, normalized (trimmed and
                    lowercased) before matching. An invalid email returns `400
                    invalid_email` and creates no contact.
                  examples:
                    - jane@example.com
                statusId:
                  type: string
                  format: uuid
                  description: >-
                    The campaign status id to place the member in, as returned
                    by `GET /v2/campaigns/{campaignId}`. Takes precedence over
                    `status`. An id that is not a status of the campaign's type
                    returns `400 invalid_campaign_status`.
                  examples:
                    - 8f9a0b1c-2d3e-4f4a-9b5c-6d7e8f9a0b1c
                status:
                  type: string
                  description: >-
                    The campaign status name, case-insensitive. Used only when
                    `statusId` is not set. Omit both to use the campaign type's
                    first status.
                  examples:
                    - Attended
            examples:
              add-member:
                summary: Add a member with a status
                value:
                  email: jane@example.com
                  status: Attended
      responses:
        '200':
          description: Member added or updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - campaignMemberId
                      - contactId
                    properties:
                      campaignMemberId:
                        type: string
                        format: uuid
                        description: The campaign member id.
                      contactId:
                        type: string
                        format: uuid
                        description: >-
                          The id of the member's contact, created if it did not
                          exist.
              examples:
                success:
                  summary: Member added
                  value:
                    data:
                      campaignMemberId: 9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c2d
                      contactId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-email:
                  summary: Invalid email
                  value:
                    error:
                      code: invalid_email
                      message: invalid email format
                invalid-status:
                  summary: Invalid campaign status
                  value:
                    error:
                      code: invalid_campaign_status
                      message: status is not valid for this campaign
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    error:
                      code: unauthorized
                      message: API key is required
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                campaign-not-found:
                  summary: Campaign not found
                  value:
                    error:
                      code: campaign_not_found
                      message: campaign not found
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal:
                  summary: Internal error
                  value:
                    error:
                      code: internal_error
                      message: failed to add campaign member
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A machine-readable error code.
              examples:
                - invalid_email
            message:
              type: string
              description: A human-readable error description.
              examples:
                - 'invalid email format: not-an-email'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your Conversion API key. Found in **Settings > Integrations** in the
        dashboard. Format: `sk_live_<key_id>_<secret>`.

````