---
updatedAt: 2025-03-06T23:33:19.000Z
agentTools:
  projectIndex: https://developer-gigpay.readme.io/llms.txt
---

# Create a new external user. (Auth policies: AppUserAuthorizationPolicy)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "GigPay.Core.Host",
    "version": "1.0"
  },
  "paths": {
    "/v1/external-users": {
      "post": {
        "tags": [
          "ExternalUsers"
        ],
        "summary": "Create a new external user. (Auth policies: AppUserAuthorizationPolicy)",
        "requestBody": {
          "description": "The <see cref=\"T:GigPay.Core.Api.Models.ExternalUsers.CreateExternalUserRequestModel\"></see> data.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExternalUserRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExternalUserRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExternalUserRequestModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "External user was successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalUserResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad request model data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "User with such auth identifier is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Personal identity is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "External user for identity is already created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [
              "AppUserAuthorizationPolicy"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateExternalUserRequestModel": {
        "required": [
          "identityId"
        ],
        "type": "object",
        "properties": {
          "identityId": {
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets personal identity identifier",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Represents create external user request model"
      },
      "ExternalUserResponseModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Gets or sets id",
            "format": "uuid"
          },
          "identityId": {
            "type": "string",
            "description": "Gets or sets personal identity identifier",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Represents external user response model"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Put access token in the box below.<br>For example: <b>Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6I</b>",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```