---
title: "Create a test user which is an agent"
method: POST
path: "/create-test-user/agents"
tags: ["create-test-user"]
---

# Create a test user which is an agent

`POST /create-test-user/agents`

This resource creates and returns a test user which is an agent. The caller can specify the required service enrolments in the request body. If no request body is supplied, the test user is created with no service enrolments.  Test users that have not been tested against within a 3-month period will be automatically deleted.

## Request body

- object — Create Agent Request

## Response `201`

The agent test user resource has been created.

- object — Create Agent Response
  - `userId` string, required — Government Gateway ID.
  - `password` string, required — Government Gateway password.
  - `userFullName` string, required — Government Gateway user's full name.
  - `emailAddress` string, required — Government Gateway user's email address.
  - `agentServicesAccountNumber` string — Agent services account reference number.

---

[API](https://skmtc.dev/hmrc/apis/api-platform-test-user.md) · [All operations](https://skmtc.dev/hmrc/apis/api-platform-test-user/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hmrc/api-platform-test-user/revisions/14d026fe1251/schema)
