---
updatedAt: 2026-05-14T14:36:14.000Z
agentTools:
  projectIndex: https://docs.talkdesk.com/llms.txt
---

# Assign Users to Campaign

Assigns one or more users to a specific campaign.
Use this endpoint to associate agents with a campaign. The maximum number of user IDs per request is 50.


# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Public API",
    "version": "5.12.68",
    "description": "Documents public API endpoints. Scopes are given to external software, that we don't control",
    "contact": {
      "name": "Talkdesk",
      "url": "https://talkdesk.com"
    }
  },
  "servers": [
    {
      "url": "https://api.talkdeskapp.com",
      "description": "United States (td-us-1)"
    },
    {
      "url": "https://api.talkdeskapp.eu",
      "description": "Europe (td-eu-1)"
    },
    {
      "url": "https://api.talkdeskappca.com",
      "description": "Canada (td-ca-1)"
    },
    {
      "url": "https://api.talkdeskapp.co.uk",
      "description": "United Kingdom (td-uk-1)"
    }
  ],
  "tags": [
    {
      "name": "Campaign Management API",
      "description": "Campaign Management API"
    }
  ],
  "paths": {
    "/campaigns/{id}/users": {
      "post": {
        "operationId": "campaigns-id-users-post",
        "summary": "Assign Users to Campaign",
        "description": "Assigns one or more users to a specific campaign.\nUse this endpoint to associate agents with a campaign. The maximum number of user IDs per request is 50.\n",
        "x-namespace": "/campaigns",
        "tags": [
          "Campaign Management API"
        ],
        "x-internal": false,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign id",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "description": "List of users to be assigned, the max of the user-ids array size is 50.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 50,
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "users identifier.",
                      "maxLength": 36
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              },
              "example": [
                {
                  "id": "88b69bad-8f19-4543-b38e-8e7c121ae04e"
                }
              ]
            }
          }
        },
        "responses": {
          "204": {
            "description": "Users successfully assigned to campaign"
          },
          "400": {
            "description": "Errors were found in the submitted data.",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "description"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": "0530001",
                  "message": "Errors were found in the submitted data"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "description"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": "0530004",
                  "message": "Missing or invalid authentication token"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "description"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": "0530003",
                  "message": "Insufficient scopes for the requested operation"
                }
              }
            }
          },
          "404": {
            "description": "Campaign not found",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "description"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": "0530002",
                  "message": "The requested resource could not be found"
                }
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "External Documentation",
    "url": "https://api-docs.talkdeskapp.com/external_docs"
  }
}
```