Skip to main content
POST
/
templates
/
create-entity
Create a new entity from a template
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/templates/create-entity \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "templateId": "60f1b3b3b3b3b3b3b3b3b3b3",
  "entityType": "challenge",
  "communityId": "60f1b3b3b3b3b3b3b3b3b3b3"
}'
"<any>"

Authorizations

x-api-token
string
header
required

Body

application/json

The input required to create an entity from a template

templateId
string
required

The ID of the template entity to copy from

Example:

"60f1b3b3b3b3b3b3b3b3b3b3"

entityType
enum<string>
required

The type of entity to create

Available options:
achievement,
action,
challenge,
community,
post,
reward
Example:

"challenge"

communityId
string
default:""

The ID of the community where the entity will be created

Example:

"60f1b3b3b3b3b3b3b3b3b3b3"

Response

Successful response

The created entity from the template. Returns the appropriate admin schema based on entityType with an additional entityType field for discrimination.

I