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

# Create recipient

> Create a new recipient.

If a recipient with the given `id` already exists, this will return a conflict error.

💡 You should use this API during your user sign up flow.


## OpenAPI

````yaml POST /recipients
openapi: 3.0.3
info:
  title: Bodhveda Notifications API
  version: '1.0'
  description: API for sending notifications to recipients or broadcasting to all.
servers: []
security: []
paths:
  /recipients:
    post:
      tags:
        - Recipients
      summary: Create a recipient
      description: Create a new recipient.
      operationId: createRecipient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRecipientPayload'
      responses:
        '201':
          description: Recipient created successfully
          content:
            application/json:
              examples:
                Recipient created:
                  summary: Recipient Created Response
                  value:
                    message: Recipient created
                    data:
                      id: recipient_123
                      name: John Doe
                      created_at: '2025-11-07T05:31:56Z'
                      updated_at: '2025-11-07T05:31:56Z'
        '409':
          description: Recipient already exists
          content:
            application/json:
              examples:
                Conflict:
                  summary: Recipient Already Exists
                  value:
                    message: Recipient already exists
      security:
        - BearerAuthWithAPIKeyWithFullAcessScope: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST https://api.bodhveda.com/recipients \
              -H "Authorization: Bearer bv_xxxxxxxxx" \
              -H "Content-Type: application/json" \
              -d '{
                "id": "recipient_123",
                "name": "Alice Johnson"
              }' 
        - lang: javascript
          label: JavaScript
          source: |-
            import { Bodhveda } from "@bodhveda/js";

            const bodhveda = new Bodhveda("bv_xxxxxxxxx");

            const recipient = await bodhveda.recipients.create({
                id: "recipient_123",
                name: "Alice Johnson",
            });
        - lang: go
          label: Go
          source: >-
            import (
                "context"

                bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
            )


            ctx := context.Background()

            client := bodhveda.NewClient("bv_xxxxxxxxx", nil)


            name := "Alice Johnson"

            recipient, _ := client.Recipients.Create(ctx,
            &bodhveda.CreateRecipientRequest{
                ID:   "recipient_123",
                Name: &name,
            })
components:
  schemas:
    CreateRecipientPayload:
      type: object
      properties:
        id:
          type: string
          description: |-
            Unique identifier from your system. 

             This cannot be changed after creation. So use a stable identifier that will not change over time.
        name:
          type: string
          description: Name of the recipient.
      required:
        - id
  securitySchemes:
    BearerAuthWithAPIKeyWithFullAcessScope:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: >-
        Bearer authentication header of the form `Bearer bv_xxxxxxxxx`, where
        `bv_xxxxxxxxx` is your **API Key** with `Full access` scope.

````