Unionavatar (1.0.0)
Download OpenAPI specification:Download
Linking Realities develop and provide identity tools for the Metaverse through Avatars. We work with cutting-edge technologies such as Computer vision, Artificial Intelligence, and blockchain to deliver our product for upcoming immersive paradigms.
The Union Avatars is a tool for companies and users to manage their digital identity as an avatar on web3.0. Current API is an early approach to onboard people as an avatar in the metaverse. It allows them to create photorealistic 3D avatars from 2D Selfie pictures and be part of this digital revolution.
You can find more about us on our website.
We suggest you follow our quickstart guide to get familiarized with our API integration.
We will walk you through the processes to create your first avatar using our API! In the beginning, you will need to have your username and password provided by us. If you don't have your credentials already, please reach out to support team.
First, you will need to get an access token that you will have to include in all request headers when requesting to our API.
To get your token, you will need to make a POST request to https://api.unionavatars.com/login.
Put attention to "Content-Type" header value in this request, it must be "application/x-www-form-urlencoded".
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/login' const myHeaders = new Headers() myHeaders.append('Content-Type', 'application/x-www-form-urlencoded')
const login = () => { const res = fetch(url, { method: 'POST', headers: myHeaders, body: JSON.stringify({username: '<YOUR_USERNAME>', password: '<YOUR_PASSWORD>'}) }) .then(res => res.json()) .then(res => console.log(res)) } login()" python="import requests
url = 'https://api.unionavatars.com/login'
headers = { 'Content-Type': 'application/x-www-form-urlencoded' }
data = { 'username': 'user@example.com', 'password': 'string' }
response = requests.post(url, headers=headers, data=data ) " csharp="using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/login\"; var body = new[] { new KeyValuePair<string, string>("username", '<YOUR_USERNAME>'), new KeyValuePair<string, string>("password", '<YOUR_PASSWORD>'), };
var res = await client.PostAsync(url, new FormUrlEncodedContent(body)); return await res.Content.ReadAsStringAsync(); }">
Most of our endpoints are protected by bearer JWT, so you will need to provide a specific Authorization header in each request you make to our API.
Sending a request that doesn't require authorization with Authorization header does not cause an error, so we recommend you to implement an interceptor/middleware that includes
your credentials in all of your requests.
Response model from /login endpoint looks like:
{
"access_token": "<YOUR_TOKEN>",
"token_type": "bearer"
}
So the header you will need to add to your request is:
<MultiLangCodeBlock javascript="const myHeaders = new Headers(); myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>');" python="{'Authorization': 'Bearer <ACCESS_TOKEN>'}" csharp="client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");">
You can also use "token_type" returned from request to /login as first value of your Authorization header. In case the token type changes in future.
<MultiLangCodeBlock javascript="const myHeaders = new Headers(); myHeaders.append('Authorization', '<TOKEN_TYPE> <ACCESS_TOKEN>');" python="{'Authorization': '<TOKEN_TYPE> <ACCESS_TOKEN>'}" csharp="client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("<TOKEN_TYPE>", "<ACCESS_TOKEN>");">
If you have any issues related to authorization, you can check the troubleshooting section.
When you create an avatar, you have to provide a body ID.
To generate the avatar with the body, you need to pass its ID in the "body" field.
You can get the list of available bodies by sending a get request to the "/bodies" endpoint.
You need to attach your auth token to the request's headers, as we explained in the previous section.
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/bodies'
const myHeaders = new Headers() myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>') myHeaders.append('Content-Type', 'application/json')
const getBodies = () => { const res = fetch(url, { heders: myHeaders }) .then(res => res.json()) .then(res => console.log(res)) } getBodies()" python="import requests
url = 'https://api.unionavatars.com/bodies'
headers = { 'Authorization': 'Bearer <ACCESS_TOKEN>', 'Content-Type': 'application/json' }
response = requests.get(url, headers=headers) " csharp = "using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/bodies\"; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");
var res = await client.GetAsync(url); return await res.Content.ReadAsStringAsync(); }">
You can store the list of bodies that have been returned and provide the specific ID of the body later for avatar creation. For further information about this respons take a look at bodies section.
When creating a head, API will respond with a 3D model even if selfie image provided is not good enough. In order to avoid wasting resources creating non usable avatars, you can validate the image sending a request before creating avatar.
The endpoint is /validation/head. It is a POST requests and only takes a body with a parameter named "img". The type of the field "img" is a base64 string.
You will need also provide authentication in headers as you did in previous requests.
Example of how to perform this request
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/validation/head'
const myHeaders = new Headers() myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>') myHeaders.append('Content-Type', 'application/json')
const createAvatar = () => { const res = fetch(url, { method: 'POST', headers: myHeaders, body: JSON.stringify({ 'img': '<IMAGE_BASE64_STRING>' }) }) .then(res => res.json()) .then(res => console.log(res)) } createAvatar()" python="import requests
url = 'https://api.unionavatars.com/validation/head'
headers = { 'Authorization': 'Bearer <ACCESS_TOKEN>', 'Content-Type': 'application/json' }
data = { 'img': '<IMAGE_BASE64_STRING>' }
response = requests.post(url, headers=headers, data=data) " csharp="using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/validation/head\"; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");
string image_json = JsonConvert.SerializeObject(new { img = "<IMAGE_BASE64_STRING>" }); var body = new StringContent(image_json, Encoding.UTF8, "application/json");
var res = await client.PostAsync(url, body); return await res.Content.ReadAsStringAsync(); }">
You can find more information about validations here
When creating an avatar, you have to provide a body and a head. The head is created from a 2D selfie image.
Here, we provide an example of constructing a base64 string from an image. We provide this in different syntaxes. However, the way to approach this will depend on your platform conditions. The main objective is to provide base64 string regardless of image entry or language.
The start point of this example is you have a selfie stored file in your system standard format as jpg, png, jpeg, etc.
<MultiLangCodeBlock javascript="function readFileAsDataURI(e) { var file = e.target.files[0]; if (!file) { return; } var reader = new FileReader();
return reader.readAsDataURL(file);
}
// In this example content comes from input in UI where user loads an image. // But you can use a BLOB class whenever it comes instead. document.getElementById('file-input').addEventListener('change', readSingleFile, false);" python="import base64
with open('/path/to/your/selfie', 'rb') as img: encoded_string = base64.b64encode(img.read()).decode('utf-8')
print(encoded_string)
" csharp="byte[] img = System.IO.File.ReadAllBytes("/path/to/your/selfie"); string base64ImageRepresentation = Convert.ToBase64String(img);
return base64ImageRepresentation;">
To create a head you have to send a POST request to /heads endpoint.
Example of how to perform this request
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/heads'
const myHeaders = new Headers() myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>') myHeaders.append('Content-Type', 'application/json')
const createHead = () => { const res = fetch(url, { method: 'POST', headers: myHeaders, body: JSON.stringify({ 'name': 'My first head', 'selfie_img': '<IMAGE_BASE64_STRING>' }) }) .then(res => res.json()) .then(res => console.log(res)) } createHead()" python="import requests
url = 'https://api.unionavatars.com/heads'
headers = { 'Authorization': 'Bearer <ACCESS_TOKEN>', 'Content-Type': 'application/json' }
data = { 'name': 'My first head', 'selfie_img': '<IMAGE_BASE64_STRING>' }
response = requests.post(url, headers=headers, data=data) " csharp="using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/heads\"; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");
string image_json = JsonConvert.SerializeObject(new { selfie_img = "<IMAGE_BASE64_STRING>", name = "My first head" }); var body = new StringContent(image_json, Encoding.UTF8, "application/json");
var res = await client.PostAsync(url, body); return await res.Content.ReadAsStringAsync(); }">
The value of field "id" from the response is the value you have to store to use in the following request.
When you create a head, its stored for you so you can use the same head with different bodies.
You can skip this step and provide the selfie image directly when sending the request to create avatar, but we highly recommend create the head yourself. When the head es autogenerated when creating the full avatar you cannot choose the head name.
You only need three values to create a new avatar: A name, selfie image or head ID and a body ID.
The name field in the request is a descriptive string that helps you to identify your avatar when getting the list of them.
The image field (named "img") is a base64 string type. If you want to try you can use online tools.
But we recommend avoid sending "img" field and send a head_id that you created in the step above. The head_id value is a UUID string.
The body ID field is a UUID string that you obtained from a previous step.
{
"name": "<YOUR_AMAZING_AVATAR_NAME>",
"head_id": "<HEAD_UUID>",
"body_id": "<BODY_UUID>",
"output_format": "fbx | glb"
}
You can skip "output_format"! The default output format is "glb", so if you want that format you just not provide the field in the request's payload. For more information about the request's payload model to create avatar, you can check detailed documentation of the endpoint
With your credentials ready in your Authorization header and the payload you just created in last section, you can send an HTTP request to obtain your avatar.
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/avatars'
const myHeaders = new Headers() myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>') myHeaders.append('Content-Type', 'application/json')
const createAvatar = () => { const res = fetch(url, { method: 'POST', headers: myHeaders, body: JSON.stringify({ 'name': '<YOUR_AMAZING_AVATAR_NAME>', 'img': '<IMAGE_BASE64_STRING>', 'body': '<BODY_UUID>', 'output_format': 'fbx | glb' }) }) .then(res => res.json()) .then(res => console.log(res)) } createAvatar()" python="import requests
url = 'https://api.unionavatars.com/avatars'
headers = { 'Authorization': 'Bearer <ACCESS_TOKEN>', 'Content-Type': 'application/json' }
data = { 'name': '<YOUR_AMAZING_AVATAR_NAME>', 'img': '<IMAGE_BASE64_STRING>', 'body': '<BODY_UUID>', 'output_format': 'fbx | glb' }
response = requests.post(url, headers=headers, data=data) " csharp="using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/avatars\"; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");
object avatar = new { name = "<YOUR_AMAZING_AVATAR_NAME>", img = "<IMAGE_BASE64_STRING>", body = "<BODY_UUID>", output_format = "fbx | glb", };
var body = new StringContent(JsonConvert.SerializeObject(avatar), Encoding.UTF8, "application/json");
var res = await client.PostAsync(url, body); return await res.Content.ReadAsStringAsync(); }">
This request will return you the avatar object containing fields like "id" and "avatar_link".
You can obtain this avatar in the future with its ID or do other operations on it.
The avatar link provides you direct access to your 3D avatar file. With a GET request, you can download your avatar ready to use in games, any other platforms!
If you need more details regarding these fields, you can check the documentation of the endpoint
Timeout when creating avatar
You might face a timeout upon your request to create an avatar.
This event is due to a long line on the request. Usually, if the request starts and you lose the connection, the avatar creation process might resolve your request.
In case of this situation, you can check your last avatar generated has the same name.
To get your last avatar you need to make a GET request to /avatars/last endpoint.
<MultiLangCodeBlock javascript="const url = 'https://api.unionavatars.com/avatars/last'
const myHeaders = new Headers() myHeaders.append('Authorization', 'Bearer <ACCESS_TOKEN>') myHeaders.append('Content-Type', 'application/json')
const getLastAvatar = () => { const res = fetch(url, { headers: myHeaders, }) .then(res => res.json()) .then(res => console.log(res)) } getLastAvatar()" python="import requests
url = 'https://api.unionavatars.com/avatars/last'
headers = { 'Authorization': 'Bearer <ACCESS_TOKEN>', 'Content-Type': 'application/json' }
response = requests.get(url, headers=headers) " csharp="using(var client = new HttpClient()) { var url = "https://api.unionavatars.com/avatars/last\"; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<ACCESS_TOKEN>");
var res = await client.GetAsync(url); return await res.Content.ReadAsStringAsync(); }">
When you are making a request to our API and you are receiving a 401 or 403 you are having troubles with authentication you provided.
Could not validate credentials
If you are getting an 401 response with a body
{
"detail": "Could not validate credentials"
}
There are many reasons causing this response:
You are sending correct request, but your token expired. In that case, you can create a new token as explained in login section
Your token is not valid. You are sending a request containing an Authorization header with the correct format, but your token value is not the same as you generated when you logged in. Maybe you changed the characters in the string or added/removed the values (like \n if you are making copy-paste).
Not autheticated
If you are getting an 401 response with a body
{
"detail": "Not authenticated"
}
You are missing the Authorization header in your request, or it is malformed. To solve this issue, make sure you send your request with an Authorization header with the correct format and valid token value.
Authorization="Bearer <ACCESS_TOKEN>"
Getting a 422 status code response means that you are trying to send a payload with one or more invalid values.
Most common cases of errors in payload are:
- Missing required parameter
- Provide not a valid type of data for some param. For example, providing a string in a field that expects a boolean.
If you check your request body and everything seems ok, maybe you are missing "Content-Type: application/json" header.
When you don't provide this header, the API will send you a 422 response saying you are missing all required fields.
How to read 422 response
The JSON structure from 422 responses can be quite confusing. It's gonna look similar to this:
{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "field required",
"type": "value_error.missing"
},
{
"loc": [
"body",
"img"
],
"msg": "Value is not valid base64",
"type": "type_error.base64"
}
]
}
You always gonna have a "detail" array containing all field validations failed.
For each validation failed you will find a "loc" array with two values. The first value is the place where parameter validation failed. In this example is in the body of the request (other values could be "param" or "path"). The second value will tell you which field are referred to. In this example we are missing "name" required field and providing a non base64 string for "img" when creating an avatar.
You also will have a "msg" and "type" strings indicating which is the specific error. "msg" field will be more human readable while "type" is the internal error type of the application (you usually gonna ignore this last field).
We are open to any suggestion or bug report!
You also can contact us to request access to our API or to request some help.
You can contact with us by sending a mail to techsupport@unionavatars.com.
Login
Request Body schema: application/x-www-form-urlencoded
grant_type | string (Grant Type) password |
username required | string (Username) |
password required | string (Password) |
scope | string (Scope) Default: "" |
client_id | string (Client Id) |
client_secret | string (Client Secret) |
Responses
Response samples
- 200
- 422
{- "access_token": "string",
- "token_type": "string"
}
Get Avatars
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
]
Create Avatars
Authorizations:
Request Body schema: application/json
name required | string (Name) |
output_format | string (OutputFormats) Default: "glb" Enum: "glb" "fbx" An enumeration. |
style | string (AssetStyles) Default: "phr" Enum: "phr" "vox" "sca" An enumeration. |
img | string <binary> (Img) |
head_id | string <uuid> (Head Id) |
body_id required | string <uuid> (Body Id) |
collection_id | string <uuid> (Collection Id) |
create_thumbnail | boolean (Create Thumbnail) Default: false |
optimize | boolean (Optimize) Default: false Only available for .glb files. You need to load KHR_mesh_quantization EXT_meshopt_compression, KHR_texture_transform extensions in your environment to be able to use optimized avatars. |
Responses
Request samples
- Payload
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "img": "string",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "collection_id": "4bdef85c-3f50-4006-a713-2350da665f80",
- "create_thumbnail": false,
- "optimize": false
}
Response samples
- 201
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
Response samples
- 200
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
Get Avatar By Id
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
Update Avatar
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Request Body schema: application/json
name | string (Name) |
output_format | string (OutputFormats) Default: "glb" Enum: "glb" "fbx" An enumeration. |
style | string (AssetStyles) Default: "phr" Enum: "phr" "vox" "sca" An enumeration. |
avatar_link | string <uri> (Avatar Link) [ 1 .. 65536 ] characters |
thumbnail_url | string <uri> (Thumbnail Url) [ 1 .. 65536 ] characters |
head_id | string <uuid> (Head Id) |
body_id | string <uuid> (Body Id) |
optimize | boolean (Optimize) Default: false Only available for .glb files. You need to load KHR_mesh_quantization EXT_meshopt_compression, KHR_texture_transform extensions in your environment to be able to use optimized avatars. |
Responses
Request samples
- Payload
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "optimize": false
}
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
Get Collections
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Get Collections Ext
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
Responses
Response samples
- 200
- 422
[- {
- "collection_info": {
- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "collection_items": [
- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
]
}
]
Update Collection
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Request Body schema: application/json
name | string (Name) |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- 200
- 422
{- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
Get Collection Ext
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "collection_info": {
- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "collection_items": [
- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
]
}
Add To Collection
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Request Body schema: application/json
avatar_id | string <uuid> (Avatar Id) |
Responses
Request samples
- Payload
{- "avatar_id": "ceaabbd8-6fdf-460c-878c-7d0ae67338c0"
}
Response samples
- 200
- 422
{- "collection_info": {
- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "collection_items": [
- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
]
}
Delete From Collection
Authorizations:
path Parameters
id required | string <uuid> (Id) |
query Parameters
avatar_id required | string <uuid> (Avatar Id) |
Responses
Response samples
- 200
- 422
{- "collection_info": {
- "name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "collection_items": [
- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "body_id": "b83f1dd5-4773-4658-891d-0c7cc9862dc2",
- "head_id": "d9a1ca39-9208-40eb-9eaa-4615ead368b8"
}
]
}
Get Bodies
Authorizations:
query Parameters
type | string (SourceTypes) Enum: "custom" "default" "exclusive" "payable" An enumeration. |
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
promotions | Array of strings (Promotions) |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "style": "phr",
- "source_type": "custom",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
Response samples
- 200
- 422
{- "name": "string",
- "style": "phr",
- "source_type": "custom",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
Assemble Body
Checking UUIDs of the parts provided exists
Authorizations:
Request Body schema: application/json
name required | string (Name) |
top_id required | string <uuid> (Top Id) |
bottom_id | string <uuid> (Bottom Id) |
shoes_id | string <uuid> (Shoes Id) |
accessories_id | string <uuid> (Accessories Id) |
Responses
Request samples
- Payload
{- "name": "string",
- "top_id": "4810e038-a9e7-4140-b9e6-3afffc89a865",
- "bottom_id": "ec6be877-7aa2-46f8-922c-76996950a8e6",
- "shoes_id": "fd77cdef-ddef-4802-b91e-9e02ec4ff672",
- "accessories_id": "926dc186-8b86-4732-ad62-d9424458eee7"
}
Response samples
- 201
- 422
{- "name": "string",
- "style": "phr",
- "source_type": "custom",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
Response samples
- 200
{- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "platform_type": "public",
- "expire_at": "2019-08-24T14:15:22Z",
- "avatar_count": 0,
- "head_count": 0,
- "avatar_package_count": 0,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "custom_bodies_count": 0,
- "subscription_type": {
- "name": "string",
- "tag": "string",
- "description": "string",
- "statement_descriptor": "string",
- "avatar_limit": 0,
- "price": 0,
- "payment_cycle": "1",
- "type": "default",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}
Get Heads
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
}
]
Create Head
Authorizations:
Request Body schema: application/json
name required | string (Name) |
output_format | string (OutputFormats) Default: "glb" Enum: "glb" "fbx" An enumeration. |
style | string (AssetStyles) Default: "phr" Enum: "phr" "vox" "sca" An enumeration. |
selfie_img required | string <binary> (Selfie Img) |
hair_id | string <uuid> (Hair Id) |
hair_color | object (Hair Color) |
Responses
Request samples
- Payload
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "selfie_img": "string",
- "hair_id": "98b64f61-c475-4772-be4e-82e70cd1827b",
- "hair_color": { }
}
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
}
Get Heads Ext
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "head_metadata": { }
}
]
Response samples
- 200
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
}
Get Head Ext By Id
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}, - "head_metadata": { }
}
Get Head By Id
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
}
Update Head
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Request Body schema: application/json
name | string (Name) |
output_format | string (OutputFormats) Default: "glb" Enum: "glb" "fbx" An enumeration. |
style | string (AssetStyles) Default: "phr" Enum: "phr" "vox" "sca" An enumeration. |
head_metadata | object (Head Metadata) |
hair_id | string <uuid> (Hair Id) |
hair_color | object (Hair Color) |
Responses
Request samples
- Payload
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "head_metadata": { },
- "hair_id": "98b64f61-c475-4772-be4e-82e70cd1827b",
- "hair_color": { }
}
Response samples
- 200
- 422
{- "name": "string",
- "output_format": "glb",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "hair": {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
}
Get Hairs
Authorizations:
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Get Hair By Id
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "name": "string",
- "hair_metadata": { },
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "style": "phr",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_metadata": { },
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Response samples
- 200
- 422
{- "name": "string",
- "brand_metadata": { },
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 422
{- "name": "string",
- "brand_metadata": { },
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
Get Outfit Collections
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Get Bodies From Outfit Collection
path Parameters
collection_id required | string <uuid> (Collection Id) |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "style": "phr",
- "source_type": "custom",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
Response samples
- 200
- 422
{- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z"
}
]
Get Head Garments
Authorizations:
query Parameters
source_type | string (SourceTypes) Enum: "custom" "default" "exclusive" "payable" An enumeration. |
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
type | string (GarmentTypes) Enum: "top" "bottom" "shoes" "accessories" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
Get Grouped Head Garments
Authorizations:
query Parameters
source_type | string (SourceTypes) Enum: "custom" "default" "exclusive" "payable" An enumeration. |
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
type | string (GarmentTypes) Enum: "top" "bottom" "shoes" "accessories" An enumeration. |
Responses
Response samples
- 200
- 422
{- "property1": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
], - "property2": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
Get Body Garments
Authorizations:
query Parameters
source_type | string (SourceTypes) Enum: "custom" "default" "exclusive" "payable" An enumeration. |
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
type | string (GarmentTypes) Enum: "top" "bottom" "shoes" "accessories" An enumeration. |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
Get Grouped Body Garments
Authorizations:
query Parameters
source_type | string (SourceTypes) Enum: "custom" "default" "exclusive" "payable" An enumeration. |
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
search | string (Search) Default: "" |
style | string (AssetStyles) Enum: "phr" "vox" "sca" An enumeration. |
type | string (GarmentTypes) Enum: "top" "bottom" "shoes" "accessories" An enumeration. |
Responses
Response samples
- 200
- 422
{- "property1": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
], - "property2": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
Get Garment
Authorizations:
path Parameters
id required | string <uuid> (Id) |
Responses
Response samples
- 200
- 422
{- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
Get Garment Collections
query Parameters
limit | integer (Limit) Default: 10 |
skip | integer (Skip) Default: 0 |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "garments": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
]
Get Outfit Collections Garment Belongs
path Parameters
garment_id required | string <uuid> (Garment Id) |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "garments": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
]
Get Garments From Collection
path Parameters
collection_id required | string <uuid> (Collection Id) |
Responses
Response samples
- 200
- 422
[- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
Get Garments From Collection Grouped
path Parameters
collection_id required | string <uuid> (Collection Id) |
Responses
Response samples
- 200
- 422
{- "property1": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
], - "property2": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
Response samples
- 200
- 422
{- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "garments": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
Response samples
- 200
- 422
[- {
- "name": "string",
- "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "garments": [
- {
- "name": "string",
- "source_type": "custom",
- "style": "phr",
- "type": "top",
- "place": "head",
- "garment_metadata": { },
- "gender": "male",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "payable_data": {
- "price": 0,
- "description": "string",
- "payment_id": "string",
}
}
]
}
]