---
title: "Create a respondent"
method: POST
path: "/respondents"
tags: ["respondents"]
---

# Create a respondent

`POST /respondents`

## Request

- Base URL: `https://localhost:8081`
- URL: `https://localhost:8081/respondents`
- Auth: none declared

Create a respondent and set up pending enrolment before account verification

## Request body

- object
  - `emailAddress` string, email: The email address of the respondent
  - `firstName` string: The first name of the respondent
  - `lastName` string: The last name of the respondent
  - `password` string: The password of the respondent
  - `telephone` string: The telephone number of the respondent
  - `enrolmentCode` string: The enrolment code the respondent is using

## Response `200`

The respondent has been created

- RespondentWithAssociations
  - `id` string, uuid
  - `sampleUnitType` string
  - `pendingEmailAddress` string, email
  - `firstName` string
  - `lastName` string
  - `telephone` string
  - `status` 'CREATED' | 'ACTIVE' | 'SUSPENDED'
  - `markForDeletion` boolean
  - `passwordVerificationToken` string
  - `passwordResetCounter` integer
  - `associations` Association[]
    - `partyId` string, uuid
    - `sampleUnitRef` string, string
    - `businessRespondentStatus` 'CREATED' | 'ACTIVE' | 'SUSPENDED'
    - `enrolments` Enrolment[]
      - `surveyId` string, uuid
      - `enrolmentStatus` 'PENDING' | 'ENABLED' | 'DISABLED' | 'SUSPENDED'

## Other responses

- `400`: There was an error in the request body, or the enrolment code was inactive
- `409`: The email address is already in use
- `500`: The business couldn't be found to associate with, or one of the other services had an error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/party-service-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/party-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/party-service-api/revisions/49a2e83bb1a7?raw)
