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

# Create Advocate

> Create an advocate for your referral program



## OpenAPI

````yaml POST /v1/advocates
openapi: 3.1.0
info:
  title: Reditus API - Advocates
  description: API specification for managing advocates in Reditus advocate programs.
  version: 1.0.0
servers:
  - url: https://api.getreditus.com/api
security: []
paths:
  /v1/advocates:
    post:
      summary: Create Advocate
      description: Create an advocate for your referral program
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvocateRequest'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvocateResponse'
        '400':
          description: Bad Request. UID blank or UID already taken.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    AdvocateRequest:
      type: object
      properties:
        uid:
          type: string
          description: The internal ID of the user in your system
        email:
          type: string
          description: The email of the user
        first_name:
          type: integer
          description: User first name
        last_name:
          type: integer
          description: User last name
        company:
          type: integer
          description: User's company name
        company_id:
          type: integer
          description: User's company ID. This is to group users from the same company
      required:
        - uid
    AdvocateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Advocate'
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              details:
                $ref: '#/components/schemas/ErrorDetails'
    Advocate:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
          properties:
            id:
              type: string
            uid:
              type: string
            email:
              type: string
            first_name:
              type: string
            last_name:
              type: string
            slug:
              type: string
            referral_link:
              type: string
            company_id:
              type: string
            company:
              type: string
            created_at:
              type: integer
    ErrorDetails:
      type: object
      description: Keyed by field name, value is an array of error messages
      example:
        uid:
          - can't be blank
          - has already been taken
      additionalProperties:
        type: array
        items:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````