---
title: "Create subject"
method: POST
path: "/v1/subjects"
tags: ["Subjects"]
---

# Create subject

`POST /v1/subjects`

## Request

- Base URL: `https://idaas.yourflexpay.com/api`
- URL: `https://idaas.yourflexpay.com/api/v1/subjects`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/reflexpay/apis/idaas-identity-as-a-service-api/docs/v1/subjects/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new subject within the authenticated application's tenant scope.

## Request body

- CreateSubjectRequest
  - `externalId` string, required
  - `displayName` string
  - `email` string
  - `metadata` object
  - `imageUrl` string

## Response `201`

Subject created

- ApiResponseSubjectResponse
  - `success` boolean
  - `message` string
  - `errorCode` string
  - `data` SubjectResponse
    - `id` string, uuid
    - `applicationId` string, uuid
    - `applicationName` string
    - `externalId` string
    - `displayName` string
    - `email` string
    - `imageUrl` string
    - `metadata` object
    - `createdAt` string, date-time
  - `errors` string[]
  - `timestamp` string, date-time

## Other responses

- `400`: Invalid request payload
- `401`: Missing or invalid bearer token

## Changes

- **2026-04-17** `db1f954badfb`: 1 breaking, 4 info
  - removed the success response with the status `200`
  - added the new optional request property `imageUrl`
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - …1 more

[Operation history](https://skmtc.dev/reflexpay/apis/idaas-identity-as-a-service-api/changes/v1/subjects/post.md)

---

[API](https://skmtc.dev/reflexpay/apis/idaas-identity-as-a-service-api.md) - [All operations](https://skmtc.dev/reflexpay/apis/idaas-identity-as-a-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reflexpay/apis/idaas-identity-as-a-service-api/revisions/db1f954badfb?raw)
