Skip to main content
POST
https://{tenantDomain}/api/v2
/
self-service-profiles
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.CreateSelfServiceProfileRequestContent{
        Name: "name",
    }
    client.SelfServiceProfiles.Create(
        context.TODO(),
        request,
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.selfServiceProfiles.create({
name: "name",
});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.selfServiceProfiles.create({
name: "name",
});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/self-service-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"branding": {
"logo_url": "<string>"
},
"allowed_strategies": [],
"user_attributes": [
{
"name": "<string>",
"description": "<string>",
"is_optional": true
}
],
"user_attribute_profile_id": "<string>"
}
'
import requests

url = "https://{tenantDomain}/api/v2/self-service-profiles"

payload = {
"name": "<string>",
"description": "<string>",
"branding": { "logo_url": "<string>" },
"allowed_strategies": [],
"user_attributes": [
{
"name": "<string>",
"description": "<string>",
"is_optional": True
}
],
"user_attribute_profile_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/self-service-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'branding' => [
'logo_url' => '<string>'
],
'allowed_strategies' => [

],
'user_attributes' => [
[
'name' => '<string>',
'description' => '<string>',
'is_optional' => true
]
],
'user_attribute_profile_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/self-service-profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"allowed_strategies\": [],\n \"user_attributes\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_optional\": true\n }\n ],\n \"user_attribute_profile_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/self-service-profiles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"allowed_strategies\": [],\n \"user_attributes\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_optional\": true\n }\n ],\n \"user_attribute_profile_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "ssp_n7SNCL8seoyV1TuSTCnAeo",
  "name": "<string>",
  "description": "<string>",
  "user_attributes": [
    {
      "name": "<string>",
      "description": "<string>",
      "is_optional": true
    }
  ],
  "created_at": "2021-01-01T00:00:00.000Z",
  "updated_at": "2021-01-01T00:00:00.000Z",
  "branding": {
    "logo_url": "<string>",
    "colors": {
      "primary": "<string>"
    }
  },
  "allowed_strategies": [],
  "user_attribute_profile_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

name
string
required

The name of the self-service Profile.

Required string length: 1 - 100
description
string

The description of the self-service Profile.

Required string length: 1 - 140
branding
object
allowed_strategies
enum<string>[]

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

Minimum array length: 1
Available options:
oidc,
samlp,
waad,
google-apps,
adfs,
okta,
auth0-samlp,
okta-samlp,
keycloak-samlp,
pingfederate
user_attributes
object[]

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

user_attribute_profile_id
string<user-attribute-profile-id>
EA

ID of the user-attribute-profile to associate with this self-service profile.

Response

Self-service profile successfully created.

id
string
default:ssp_n7SNCL8seoyV1TuSTCnAeo

The unique ID of the self-service Profile.

name
string

The name of the self-service Profile.

description
string

The description of the self-service Profile.

user_attributes
object[]

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

created_at
string<date-time>
default:2021-01-01T00:00:00.000Z

The time when this self-service Profile was created.

updated_at
string<date-time>
default:2021-01-01T00:00:00.000Z

The time when this self-service Profile was updated.

branding
object
allowed_strategies
enum<string>[]

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

Minimum array length: 1
Available options:
oidc,
samlp,
waad,
google-apps,
adfs,
okta,
auth0-samlp,
okta-samlp,
keycloak-samlp,
pingfederate
user_attribute_profile_id
string<user-attribute-profile-id>
EA

ID of the user-attribute-profile to associate with this self-service profile.