Introduction
This documentation aims to provide all the information you need to work with our API.
SDKs
Software Development Kits (SDKs) allow developers to easily render 3D dice and interact with the API specifications below. We offer SDKs for the following languages:
If you have a particular language you wish to use dddice with, please let us know.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting My Account > Developers and clicking Copy API Key.
You must have an account to use the API.
Theme
API for managing themes.
List Themes
requires authentication
Fetch a list of themes. Only the most recent version of each theme is returned where the "most recent" is determined by SemVer 2.0.0
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "theme[]",
"data": [
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "sit-quo",
"name": "Mrs.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Qui optio aliquam ut quaerat. Deleniti voluptate consequatur doloribus odit ducimus. Delectus omnis sit eveniet et sit necessitatibus. Est eius error quia ex quam.",
"user": {
"username": "roxanne02",
"uuid": "5ebc25f3-37ae-3c14-a10b-f77097f4d104",
"name": "Mr. Carter Schamberger",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
},
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "quia-est-esse",
"name": "Prof.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Vel quasi necessitatibus voluptatem repellat. Perspiciatis at ea aperiam dolorem eos voluptate. Velit rerum tempore explicabo. Sit dolor illum sit magnam qui voluptatum id mollitia.",
"user": {
"username": "wayne84",
"uuid": "e0b0dc23-7eaf-3591-ba4c-01a831c5cf59",
"name": "Dr. Bryana Schultz V",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
}
]
}
Received response:
Request failed with error:
Create a Theme
requires authentication
Create a theme using a theme manifest and save to your dddice.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/theme" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "frag_shader=vitae" \
--form "manifest={"meshes":{"d4":"/mesh/d04.fbx","d6":"/mesh/d06.fbx","d8":"/mesh/d08.fbx","d10":"/mesh/d10.fbx","d10x":"/mesh/d10.fbx","d12":"/mesh/d12.fbx","d20":"/mesh/d20.fbx"},"available_dice":["d4","d6","d8","d10","d10x","d12","d20"],"physics":{"inertia":{"d4":5,"d6":12,"d8":10,"d10":9,"d10x":9,"d12":8,"d20":6},"weight":{"d4":300,"d6":300,"d8":340,"d10":350,"d10x":350,"d12":350,"d20":400}},"sizes":{"d4":1,"d6":1,"d8":1,"d10":1,"d10x":1,"d12":1,"d20":1},"sounds":[{"src":"/sounds/roll-1.mp3","on":"die.collide"},{"src":"/sounds/roll-2.mp3","on":"die.collide"},{"src":"/sounds/roll-3.mp3","on":"die.collide"}],"uniforms":{"diffuse":{"type":"color","value":{"r":1,"g":0.929,"b":0}},"number":{"type":"color","value":{"r":0.463,"g":0.424,"b":0}}},"values":{"d4":[1,2,3,4],"d6":[1,2,3,4,5,6],"d8":[1,2,3,4,5,6,7,8],"d10":[1,2,3,4,5,6,7,8,9,10],"d12":[1,2,3,4,5,6,7,8,9,10,11,12],"d20":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"d10x":[10,20,30,40,50,60,70,80,90,0]},"id":"delectus_perferendis","version":"1.0.0","api_version":"1.0","name":"Miss","description":"Distinctio esse est dolores sit praesentium laboriosam officiis. Iure qui voluptatibus quidem atque nobis est consectetur enim. Eveniet harum quod quae optio repellat.","label":{"color":"#000000","background_color":"#e3d12d"},"textures":[{"binding":"u_numberMap","src":{"d4":"u_numberMap.png","d6":"u_numberMap.png","d8":"u_numberMap.png","d10":"u_numberMap.png","d12":"u_numberMap.png","d20":"u_numberMap.png","d10x":"u_numberMap_d10x.png"}}],"user":{"username":"ea_est","uuid":"c5de15e0-4337-11ed-abda-0242ac120003","name":"Ms. Demetris Mraz II","created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"},"created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"}" \
--form "vert_shader=debitis" \
--form "assets[]=@/tmp/phpz1zetp"
const url = new URL(
"https://dddice.com/api/1.0/theme"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('frag_shader', 'vitae');
body.append('manifest', '{"meshes":{"d4":"/mesh/d04.fbx","d6":"/mesh/d06.fbx","d8":"/mesh/d08.fbx","d10":"/mesh/d10.fbx","d10x":"/mesh/d10.fbx","d12":"/mesh/d12.fbx","d20":"/mesh/d20.fbx"},"available_dice":["d4","d6","d8","d10","d10x","d12","d20"],"physics":{"inertia":{"d4":5,"d6":12,"d8":10,"d10":9,"d10x":9,"d12":8,"d20":6},"weight":{"d4":300,"d6":300,"d8":340,"d10":350,"d10x":350,"d12":350,"d20":400}},"sizes":{"d4":1,"d6":1,"d8":1,"d10":1,"d10x":1,"d12":1,"d20":1},"sounds":[{"src":"/sounds/roll-1.mp3","on":"die.collide"},{"src":"/sounds/roll-2.mp3","on":"die.collide"},{"src":"/sounds/roll-3.mp3","on":"die.collide"}],"uniforms":{"diffuse":{"type":"color","value":{"r":1,"g":0.929,"b":0}},"number":{"type":"color","value":{"r":0.463,"g":0.424,"b":0}}},"values":{"d4":[1,2,3,4],"d6":[1,2,3,4,5,6],"d8":[1,2,3,4,5,6,7,8],"d10":[1,2,3,4,5,6,7,8,9,10],"d12":[1,2,3,4,5,6,7,8,9,10,11,12],"d20":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"d10x":[10,20,30,40,50,60,70,80,90,0]},"id":"delectus_perferendis","version":"1.0.0","api_version":"1.0","name":"Miss","description":"Distinctio esse est dolores sit praesentium laboriosam officiis. Iure qui voluptatibus quidem atque nobis est consectetur enim. Eveniet harum quod quae optio repellat.","label":{"color":"#000000","background_color":"#e3d12d"},"textures":[{"binding":"u_numberMap","src":{"d4":"u_numberMap.png","d6":"u_numberMap.png","d8":"u_numberMap.png","d10":"u_numberMap.png","d12":"u_numberMap.png","d20":"u_numberMap.png","d10x":"u_numberMap_d10x.png"}}],"user":{"username":"ea_est","uuid":"c5de15e0-4337-11ed-abda-0242ac120003","name":"Ms. Demetris Mraz II","created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"},"created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"}');
body.append('vert_shader', 'debitis');
body.append('assets[]', document.querySelector('input[name="assets[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/theme',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'frag_shader',
'contents' => 'vitae'
],
[
'name' => 'manifest',
'contents' => '{"meshes":{"d4":"/mesh/d04.fbx","d6":"/mesh/d06.fbx","d8":"/mesh/d08.fbx","d10":"/mesh/d10.fbx","d10x":"/mesh/d10.fbx","d12":"/mesh/d12.fbx","d20":"/mesh/d20.fbx"},"available_dice":["d4","d6","d8","d10","d10x","d12","d20"],"physics":{"inertia":{"d4":5,"d6":12,"d8":10,"d10":9,"d10x":9,"d12":8,"d20":6},"weight":{"d4":300,"d6":300,"d8":340,"d10":350,"d10x":350,"d12":350,"d20":400}},"sizes":{"d4":1,"d6":1,"d8":1,"d10":1,"d10x":1,"d12":1,"d20":1},"sounds":[{"src":"/sounds/roll-1.mp3","on":"die.collide"},{"src":"/sounds/roll-2.mp3","on":"die.collide"},{"src":"/sounds/roll-3.mp3","on":"die.collide"}],"uniforms":{"diffuse":{"type":"color","value":{"r":1,"g":0.929,"b":0}},"number":{"type":"color","value":{"r":0.463,"g":0.424,"b":0}}},"values":{"d4":[1,2,3,4],"d6":[1,2,3,4,5,6],"d8":[1,2,3,4,5,6,7,8],"d10":[1,2,3,4,5,6,7,8,9,10],"d12":[1,2,3,4,5,6,7,8,9,10,11,12],"d20":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"d10x":[10,20,30,40,50,60,70,80,90,0]},"id":"delectus_perferendis","version":"1.0.0","api_version":"1.0","name":"Miss","description":"Distinctio esse est dolores sit praesentium laboriosam officiis. Iure qui voluptatibus quidem atque nobis est consectetur enim. Eveniet harum quod quae optio repellat.","label":{"color":"#000000","background_color":"#e3d12d"},"textures":[{"binding":"u_numberMap","src":{"d4":"u_numberMap.png","d6":"u_numberMap.png","d8":"u_numberMap.png","d10":"u_numberMap.png","d12":"u_numberMap.png","d20":"u_numberMap.png","d10x":"u_numberMap_d10x.png"}}],"user":{"username":"ea_est","uuid":"c5de15e0-4337-11ed-abda-0242ac120003","name":"Ms. Demetris Mraz II","created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"},"created_at":"2022-10-03T16:23:55.000000Z","updated_at":"2022-10-03T16:23:55.000000Z"}'
],
[
'name' => 'vert_shader',
'contents' => 'debitis'
],
[
'name' => 'assets[]',
'contents' => fopen('/tmp/phpz1zetp', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"data": {
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "laudantium-optio-eius",
"name": "Dr.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Praesentium magni et atque rerum consequatur qui impedit. Accusamus ab possimus id placeat aspernatur quis. Earum dolore sed itaque tempore id nihil itaque. Unde non provident quia autem occaecati.",
"user": {
"username": "upadberg",
"uuid": "c71d949c-22c2-3e44-b82f-780e5b1565a2",
"name": "Tanner Kertzmann",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
}
}
Received response:
Request failed with error:
Get Theme
requires authentication
Get information about a theme. Returns the latest version.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme/dddice-bees" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme/dddice-bees',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "voluptas-consectetur",
"name": "Ms.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Laborum iste aperiam omnis dolores. Qui esse et ut deleniti quisquam numquam ut. Rerum sapiente tenetur delectus possimus sunt. Assumenda quia delectus ut rerum consequatur.",
"user": {
"username": "wolf.cortney",
"uuid": "a7b799eb-f65e-3307-9036-a474c6d3fa00",
"name": "Maurice Prosacco",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
}
}
Received response:
Request failed with error:
Delete Theme
requires authentication
Delete all versions of a given theme.
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/theme/dddice-bees" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/theme/dddice-bees',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Get All Theme Versions
requires authentication
List all versions of a given theme.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme/dddice-bees/version" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/version"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme/dddice-bees/version',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "theme[]",
"data": [
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "dolorem-quis",
"name": "Mrs.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Dolores voluptas adipisci eaque accusamus quis. Quam voluptatem accusamus minus accusamus commodi ea iste. Doloremque id eaque atque dolores. Ut saepe odit eum quod sint ullam.",
"user": {
"username": "kade17",
"uuid": "45bfd2af-6fb1-3c32-8ad5-38ce7fc9e869",
"name": "Joany Mitchell",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
},
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "qui-quaerat",
"name": "Ms.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Molestiae eius molestias molestias inventore voluptas. Dolorem error quas quos nesciunt consequatur ea doloribus saepe.",
"user": {
"username": "stokes.maximillia",
"uuid": "a739b647-ae5d-3e99-bb3c-9c4d94efaf98",
"name": "Rhianna Dooley",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
}
]
}
Received response:
Request failed with error:
Get a Theme Version
requires authentication
Get a specific version of a given theme.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme/dddice-bees/version/1.0.0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/version/1.0.0"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme/dddice-bees/version/1.0.0',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"data": {
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "est-dolorum-libero",
"name": "Ms.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Enim deserunt enim accusantium sit. Distinctio odio pariatur eos dolor unde qui. Id commodi reprehenderit consequatur eum cumque.",
"user": {
"username": "qdenesik",
"uuid": "cf0d527d-cac3-325b-9127-b0c65b85a159",
"name": "Saige Stoltenberg PhD",
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:11.000000Z",
"updated_at": "2025-03-18T01:20:11.000000Z"
}
}
Received response:
Request failed with error:
Delete Theme Version
requires authentication
Delete a specific version of a given theme.
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/theme/dddice-bees/version/possimus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/version/possimus"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/theme/dddice-bees/version/possimus',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Report Theme
requires authentication
Report a theme for abuse or spam.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/theme/dddice-bees/report" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/report"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/theme/dddice-bees/report',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Chart: Frequency of roll values
requires authentication
Get statistical information about a theme.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme/dddice-bees/statistic/histogram/values" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/statistic/histogram/values"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme/dddice-bees/statistic/histogram/values',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"labels": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"datasets": [{
"label": "d4",
"data": [12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}, {
"label": "d6",
"data": [5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}, {
"label": "d8",
"data": [8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}, {
"label": "d20",
"data": [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
}],
"processed_at": "2023-10-06T21:36:22.462064Z"
"updated_at": "2023-10-06T21:37:11.221642Z"
}
}
Received response:
Request failed with error:
Chart: Total rolls over time
requires authentication
Get statistical information about a theme.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/theme/dddice-bees/statistic/timeseries/rolls" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/theme/dddice-bees/statistic/timeseries/rolls"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/theme/dddice-bees/statistic/timeseries/rolls',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"labels": ["2023-01-01", "2023-01-02", "2023-01-03"],
"datasets": [{
"label": "Rolls over time",
"data": [1000, 1100, 1200]
}],
"processed_at": "2023-10-06T21:36:22.462064Z"
"updated_at": "2023-10-06T21:37:11.221642Z"
}
}
Received response:
Request failed with error:
Room
API for managing rooms.
List Rooms
requires authentication
List all rooms created or joined by a user
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/room?created=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/room"
);
const params = {
"created": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/room',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'created' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "room[]",
"data": [
{
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-2.webp",
"slug": "Sz89ffd",
"passcode": "veritatis",
"custom_slug": "jXT0qcm",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "kshlerin.kim",
"uuid": "409e7474-a692-3bf1-956d-171986729b5c",
"name": "Elfrieda Gulgowski",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": [
{
"id": 2,
"username": "nemo_qui",
"color": "#f6c5d4",
"position": 0,
"settings": null,
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"deleted_at": null,
"user": {
"username": "yundt.maximo",
"uuid": "09bb3046-a43c-3012-8559-9548eeb6c667",
"name": "Meaghan Cronin",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
},
{
"id": 3,
"username": "labore_at",
"color": "#4d9752",
"position": 0,
"settings": null,
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"deleted_at": null,
"user": {
"username": "ghoppe",
"uuid": "9697d489-e0ab-3c70-b967-7ec4276c3c83",
"name": "Katlyn Upton Jr.",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
}
]
},
{
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-2.webp",
"slug": "oyustiI",
"passcode": "est",
"custom_slug": "G-Q2y_F",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "magali.jacobs",
"uuid": "81feddfd-4f78-3510-b448-8d86f9bfc315",
"name": "Krista Harvey",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": [
{
"id": 4,
"username": "voluptas_autem",
"color": "#6010d1",
"position": 0,
"settings": null,
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"deleted_at": null,
"user": {
"username": "larkin.caitlyn",
"uuid": "760ebcaa-ab60-308e-9a33-f3779e71fcaf",
"name": "Pearlie Stoltenberg",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
},
{
"id": 5,
"username": "et_accusamus",
"color": "#7c9d9a",
"position": 0,
"settings": null,
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"deleted_at": null,
"user": {
"username": "wolf.paxton",
"uuid": "bc7a9825-303d-3151-bf06-0859c5b76939",
"name": "Prof. Veda Beer Jr.",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
}
]
}
]
}
Received response:
Request failed with error:
Create a Room
requires authentication
Create a room and use the slug to perform actions in that room.
If is_public
is set to false
, the returned passcode
will be required
for future requests to perform actions in this room.
You may optionally pass a valid passcode
to generate your own code.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/room" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_public\": true,
\"name\": \"eos\"
}"
const url = new URL(
"https://dddice.com/api/1.0/room"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_public": true,
"name": "eos"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/room',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'is_public' => true,
'name' => 'eos',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"data": {
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-4.webp",
"slug": "9Qt_8tR",
"passcode": "sed",
"custom_slug": "0gZzTb0",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "phowell",
"uuid": "01eb2d18-2325-3e7c-b849-1ae60d07a249",
"name": "Royce Vandervort",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": []
}
}
Received response:
Request failed with error:
Get a Room
requires authentication
Get information about a room and active participants.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/room/j82tr4?passcode=ut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4"
);
const params = {
"passcode": "ut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/room/j82tr4',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'passcode' => 'ut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-4.webp",
"slug": "1ADvK9i",
"passcode": "qui",
"custom_slug": "FBMTGDN",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "jdaniel",
"uuid": "40cedc85-ceba-3e10-9794-d989b6556064",
"name": "Mr. Elbert Bechtelar",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": []
}
}
Received response:
Request failed with error:
Update a Room
requires authentication
Update the name of a room
Example request:
curl --request PATCH \
"https://dddice.com/api/1.0/room/j82tr4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "is_public=1" \
--form "name=eveniet" \
--form "custom_slug=zyuewul" \
--form "bg_file_path=@/tmp/phpIXFEq2"
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('is_public', '1');
body.append('name', 'eveniet');
body.append('custom_slug', 'zyuewul');
body.append('bg_file_path', document.querySelector('input[name="bg_file_path"]').files[0]);
fetch(url, {
method: "PATCH",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://dddice.com/api/1.0/room/j82tr4',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'is_public',
'contents' => '1'
],
[
'name' => 'name',
'contents' => 'eveniet'
],
[
'name' => 'custom_slug',
'contents' => 'zyuewul'
],
[
'name' => 'bg_file_path',
'contents' => fopen('/tmp/phpIXFEq2', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-2.webp",
"slug": "jdgPToQ",
"passcode": "et",
"custom_slug": "NF7Q2AR",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "dgislason",
"uuid": "dcd6aa30-145d-3103-922a-097530f08bcc",
"name": "Else Wiegand",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": []
}
}
Received response:
Request failed with error:
Delete a Room
requires authentication
Delete a room you own.
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/room/j82tr4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/room/j82tr4',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Update Room Rolls
requires authentication
Automatically pickup dice from the board or unhide dice to players for all rolls in a room and for the current player.
Example request:
curl --request PATCH \
"https://dddice.com/api/1.0/room/1/roll" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dice\": {
\"is_hidden\": true,
\"is_visible\": false,
\"is_cleared\": true
}
}"
const url = new URL(
"https://dddice.com/api/1.0/room/1/roll"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dice": {
"is_hidden": true,
"is_visible": false,
"is_cleared": true
}
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://dddice.com/api/1.0/room/1/roll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'dice' => [
'is_hidden' => true,
'is_visible' => false,
'is_cleared' => true,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Join a Room
requires authentication
Join a room as a participant
Example request:
curl --request POST \
"https://dddice.com/api/1.0/room/j82tr4/participant" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4/participant"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/room/j82tr4/participant',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-4.webp",
"slug": "5kx7T4a",
"passcode": "nisi",
"custom_slug": "ZEJlgFh",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "corkery.retha",
"uuid": "15a8c512-eca6-318c-8e58-50eded6dd512",
"name": "Danielle Heller V",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": []
}
}
Received response:
Request failed with error:
Update a Participant
requires authentication
Update the username or color of the room participant.
Example request:
curl --request PATCH \
"https://dddice.com/api/1.0/room/j82tr4/participant/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"username\": \"Galstaff Sorcerer of Light\",
\"color\": \"#FF0000\",
\"dice_tray\": []
}"
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4/participant/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "Galstaff Sorcerer of Light",
"color": "#FF0000",
"dice_tray": []
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://dddice.com/api/1.0/room/j82tr4/participant/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'username' => 'Galstaff Sorcerer of Light',
'color' => '#FF0000',
'dice_tray' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"name": "Untitled Room",
"is_public": true,
"bg_file_path": "//images/environment/bg-6.webp",
"slug": "z3EYovp",
"passcode": "officia",
"custom_slug": "HABO5as",
"settings": {
"chat": {
"backgroundColor": 0,
"deleteAfter": 0,
"fadeAfter": 0,
"isDiceExpanded": false,
"isDiceSorted": false,
"isUsernameVisible": true,
"isVisible": true,
"textColor": 16777215,
"textSize": "sm"
},
"lighting": {
"ambientColor": 16777215,
"ambientIntensity": 0.5,
"spotlightColor": 16777215,
"spotlightIntensity": 0.33
},
"participant": {
"defaultDiceTrayToGM": false
},
"physics": {
"gravity": 9.82,
"throwSpeed": 30
},
"roll": {
"allowPlayerRollUpdates": false,
"allowPlayerMoveDice": false,
"autoClear": 10,
"defaultClickBehavior": "reroll",
"diceSize": 1,
"diceLimit": 25,
"diceTrayColor": 0,
"disableDiceOutline": false,
"disableDiceShadows": false,
"disableShakingSound": false,
"pickUp": 1
}
},
"updated_at": "2025-03-18T01:20:10.000000Z",
"created_at": "2025-03-18T01:20:10.000000Z",
"user": {
"username": "stokes.trudie",
"uuid": "7d5413cb-864b-3f8a-835d-8c7e3530dde1",
"name": "Branson Pfannerstill DDS",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
"participants": []
}
}
Received response:
Request failed with error:
Leave a Room
requires authentication
Remove a participant from a room. Participants can choose to leave a room using this endpoint. Room owners have permission to remove any participant.
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/room/j82tr4/participant/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/room/j82tr4/participant/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/room/j82tr4/participant/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Roll
API for creating and managing dice rolls.
Create a Roll
requires authentication
Perform a dice roll and optionally send the result to a public or private room.
Dice roll values are calculated using the API but can optionally receive a
value
and/or value_to_display
attribute to pass a predetermined value (i.e. when integrating with VTTs).
Operators Operators allow one to manipulate the outcome of the dice roll. The syntax of operators is based on Avrae which implements d20 dice syntax.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/roll" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dice\": [
{
\"type\": \"d20\",
\"theme\": \"dddice-red\"
},
{
\"type\": \"d20\",
\"theme\": \"dddice-red\"
}
],
\"room\": \"j82tr4\",
\"label\": \"Longbow damage with Hunter\'s Mark\"
}"
const url = new URL(
"https://dddice.com/api/1.0/roll"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dice": [
{
"type": "d20",
"theme": "dddice-red"
},
{
"type": "d20",
"theme": "dddice-red"
}
],
"room": "j82tr4",
"label": "Longbow damage with Hunter's Mark"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/roll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (($p = &\Symfony\Component\VarExporter\Internal\Registry::$prototypes)['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
clone $p['stdClass'],
],
null,
[
'stdClass' => [
'type' => [
'd20',
'd20',
],
'theme' => [
'dddice-red',
'dddice-red',
],
],
],
[
'dice' => [
$o[0],
$o[1],
],
'room' => 'j82tr4',
'label' => 'Longbow damage with Hunter\'s Mark',
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
Received response:
Request failed with error:
Response
Response Fields
uuid
string
The ID of the roll
direction
number
The angle the roll was thrown (in degrees)
velocity
number
How hard the roll was thrown
user
object
User Object
room
object
Room Object
values
object[]
Roll Value Objects
operator
object
Roll Operators (if any were used)
total_value
number
Sum of all roll value totals
created_at
string
Created timestamp
updated_at
string
Updated timestamp
List rolls
requires authentication
Fetch rolls from a given room
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/roll?room=j82tr4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/roll"
);
const params = {
"room": "j82tr4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/roll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'room' => 'j82tr4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Get a Roll
requires authentication
Fetch roll information including the user and optional room information
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/roll/1a88ce45-60b0-301d-85ff-dee70c037586" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/roll/1a88ce45-60b0-301d-85ff-dee70c037586"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/roll/1a88ce45-60b0-301d-85ff-dee70c037586',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Update a Roll
requires authentication
Pickup dice from the board or unhide dice to players
Example request:
curl --request PATCH \
"https://dddice.com/api/1.0/roll/2f9005be-7837-3abd-82e9-005f06dcf536" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"excepturi\",
\"dice\": [
{
\"uuid\": \"1\",
\"is_hidden\": true
}
]
}"
const url = new URL(
"https://dddice.com/api/1.0/roll/2f9005be-7837-3abd-82e9-005f06dcf536"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "excepturi",
"dice": [
{
"uuid": "1",
"is_hidden": true
}
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://dddice.com/api/1.0/roll/2f9005be-7837-3abd-82e9-005f06dcf536',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[
'stdClass' => [
'uuid' => [
'1',
],
'is_hidden' => [
true,
],
],
],
[
'label' => 'excepturi',
'dice' => [
$o[0],
],
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Response
Response Fields
uuid
string
The ID of the roll
direction
number
The angle the roll was thrown (in degrees)
velocity
number
How hard the roll was thrown
user
object
User Object
room
object
Room Object
values
object[]
Roll Value Objects
total_value
number
Sum of all roll value totals
created_at
string
Created timestamp
updated_at
string
Updated timestamp
Bulk Update Rolls
requires authentication
Pickup dice from the board or unhide dice to players for multiple rolls.
Accepts an array of objects with the same parameters as PATCH /api/1.0/roll/{id}
.
Example request:
curl --request PATCH \
"https://dddice.com/api/1.0/roll" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rolls\": [
{
\"dice\": [
{
\"uuid\": \"50bcf781-3b14-36a0-a197-e432a36e00f2\",
\"is_cleared\": true,
\"is_dropped\": true,
\"is_hidden\": true
}
]
}
]
}"
const url = new URL(
"https://dddice.com/api/1.0/roll"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rolls": [
{
"dice": [
{
"uuid": "50bcf781-3b14-36a0-a197-e432a36e00f2",
"is_cleared": true,
"is_dropped": true,
"is_hidden": true
}
]
}
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://dddice.com/api/1.0/roll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'rolls' => [
[
'dice' => [
[
'uuid' => '50bcf781-3b14-36a0-a197-e432a36e00f2',
'is_cleared' => true,
'is_dropped' => true,
'is_hidden' => true,
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Delete rolls
requires authentication
Delete rolls from a given room
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/roll" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/roll"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/roll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Share Dice
API for managing share requests.
Create Share Request
requires authentication
Create a share request for a given theme.
Accept Share Request
requires authentication
Accept a user's share request which will add the specified theme to your Digital Dice Box.
You can retrieve and modify this theme from your Digitial Dice Box by using the DiceBox endpoints.
User
API for managing users.
Get Authenticated User
requires authentication
Get the current authenticated user.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/user"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/user',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "user",
"data": {
"name": "Mr. Roman Schiller",
"username": "dominic62",
"uuid": "e4e779e0-e2d4-34cf-b2cc-5443985b34dc",
"updated_at": "2025-03-18T01:20:11.000000Z",
"created_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
}
}
Received response:
Request failed with error:
Create Guest User
Create a guest user to communicate with other API endpoints. Returns a token that can be used to fetch a user.
This route is rate-limited to 3 accounts/per minute per IP.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"type": "user",
"data": {
"name": "Cruz Howell",
"username": "stark.nolan",
"uuid": "f2c5ac2b-6966-312f-beb6-b0aeed38ea21",
"updated_at": "2025-03-18T01:20:11.000000Z",
"created_at": "2025-03-18T01:20:11.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
}
}
Received response:
Request failed with error:
Create API Token
requires authentication
Returns a new API token for the authenticated user.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/user/token" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"magni\"
}"
const url = new URL(
"https://dddice.com/api/1.0/user/token"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "magni"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/user/token',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'magni',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"type": "token",
"data": "<your-new-api-token>"
}
Received response:
Request failed with error:
Delete API Key
requires authentication
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/user/token/debitis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/user/token/debitis"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/user/token/debitis',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Dice Box
API for managing themes in your Digital Dice Box.
List Dice Box Collection
requires authentication
Fetch a list of all dice in your Digital Dice Box.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/dice-box?filter=omnis&ids=aliquam" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"limit\": 5.329104,
\"filter\": \"et\"
}"
const url = new URL(
"https://dddice.com/api/1.0/dice-box"
);
const params = {
"filter": "omnis",
"ids": "aliquam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"limit": 5.329104,
"filter": "et"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/dice-box',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter' => 'omnis',
'ids' => 'aliquam',
],
'json' => [
'limit' => 5.329104,
'filter' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "theme[]",
"data": [
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "recusandae-eos",
"name": "Mr.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Doloremque vitae voluptates et eius aut harum harum commodi. Esse ipsa vero odio exercitationem provident blanditiis non. Aliquid et rerum quidem sapiente inventore aspernatur aut.",
"user": {
"username": "tyrel.hegmann",
"uuid": "cd25ae8d-1b0d-35ba-821a-0964c173d4c6",
"name": "Dr. Wilson Quitzon IV",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
},
{
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "qui-omnis-atque",
"name": "Miss",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Quis aliquam et quia et placeat quae consequatur. Est maxime velit magni aut quia. Qui quod et sunt explicabo. Adipisci ut dolorem ea maxime dolorum.",
"user": {
"username": "duane94",
"uuid": "ee875336-296e-3190-ac40-f58a8df993ca",
"name": "Mr. Alexis Collier",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
]
}
Received response:
Request failed with error:
Add Theme to Dice Box
requires authentication
Add a theme to your Digital Dice Box.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/dice-box" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"harum\"
}"
const url = new URL(
"https://dddice.com/api/1.0/dice-box"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"id": "harum"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/dice-box',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'id' => 'harum',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
{
"data": {
"meshes": {
"d4": "/mesh/d04.fbx",
"d6": "/mesh/d06.fbx",
"d8": "/mesh/d08.fbx",
"d10": "/mesh/d10.fbx",
"d10x": "/mesh/d10.fbx",
"d12": "/mesh/d12.fbx",
"d20": "/mesh/d20.fbx"
},
"available_dice": [
"d4",
"d6",
"d8",
"d10",
"d10x",
"d12",
"d20"
],
"physics": {
"inertia": {
"d4": 5,
"d6": 12,
"d8": 10,
"d10": 9,
"d10x": 9,
"d12": 8,
"d20": 6
},
"weight": {
"d4": 300,
"d6": 300,
"d8": 340,
"d10": 350,
"d10x": 350,
"d12": 350,
"d20": 400
}
},
"sizes": {
"d4": 1,
"d6": 1,
"d8": 1,
"d10": 1,
"d10x": 1,
"d12": 1,
"d20": 1
},
"sounds": [
{
"src": "/sounds/roll-1.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-2.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-3.mp3",
"on": "die.collide"
},
{
"src": "/sounds/roll-loading-sm.mp3",
"on": "roll.loading",
"value": 2
},
{
"src": "/sounds/roll-loading-lg.mp3",
"on": "roll.loading",
"value": ">=3"
}
],
"uniforms": {
"number": {
"type": "color",
"value": {
"b": 0,
"g": 0.424,
"r": 0.463
}
},
"diffuse": {
"type": "color",
"value": {
"b": 0,
"g": 0.929,
"r": 1
}
}
},
"values": {
"d4": [
1,
2,
3,
4
],
"d6": [
1,
2,
3,
4,
5,
6
],
"d8": [
1,
2,
3,
4,
5,
6,
7,
8
],
"d10": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"d12": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"d20": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"d10x": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
0
]
},
"id": "adipisci-ea",
"name": "Dr.",
"label": {
"color": "#000000",
"background_color": "#e3d12d"
},
"version": "1.0.0",
"textures": [
{
"src": {
"d4": "u_numberMap.png",
"d6": "u_numberMap.png",
"d8": "u_numberMap.png",
"d10": "u_numberMap.png",
"d12": "u_numberMap.png",
"d20": "u_numberMap.png",
"d10x": "u_numberMap_d10x.png"
},
"binding": "u_numberMap"
}
],
"api_version": "1.0",
"description": "Sunt quia fuga qui et repellendus quia et. Laudantium ut voluptatem consequatur minima iste voluptatem velit. Quisquam iure aut sit aut.",
"user": {
"username": "konopelski.vella",
"uuid": "054f60ab-d315-3d3e-914d-888261abbf7b",
"name": "Mr. Candelario Howell Sr.",
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z",
"subscription": false,
"is_merchant": false,
"is_registered": false
},
"created_at": "2025-03-18T01:20:10.000000Z",
"updated_at": "2025-03-18T01:20:10.000000Z"
}
}
Received response:
Request failed with error:
Delete Dice Box Theme
requires authentication
Delete a share request which will invalidate any shared URLs
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/dice-box/recusandae" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/dice-box/recusandae"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/dice-box/recusandae',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error:
Integration Authentication
API for authenticating with third-party applications and integrations
Create activation code
When setting up an integration, it is advised to present a potential user with a "code" and then have the user enter that code on the official dddice website.
This is not only easy for the user to interact with, it also helps prevent odd handshakes
and security barriers when trying to authenticate with cookies and/or other mechanisms,
especially when trying to authenticate inside an iframe
.
Call this endpoint and receive an activation code in 'code' and an authentication secret in 'secret'.
Display the code to the user and ask them to navigate to https://dddice.com/activate where they will be prompted to login/register (as needed) and then enter the code.
Your integration can poll GET /activate/{code} to be notified when the user completes the activation flow. See that endpoint's documentation for more details.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/activate" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/activate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/activate',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (201):
Received response:
Request failed with error:
Read activation code
While waiting for the user to authenticate, this endpoint can be used to retrieve the latest status of the activation code. We recommend you poll this endpoint no more frequently than every 5 seconds
One the user has completed the login/registration process and approved the code for activation you will receive an API key in the 'token' field.
This can then be used to authenticate all future requests as that user.
The Secret in the headers is the secret you received along with the code from POST /authenticate
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/activate/omnis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Authorization: Secret secret-value"
const url = new URL(
"https://dddice.com/api/1.0/activate/omnis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Authorization: Secret secret-value",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/activate/omnis',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Authorization: Secret secret-value',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Authenticate activation code
requires authentication
After a user is prompted to enter a code, this (protected) endpoint is used to sync the requesting user and secret/code together to activate the integration.
This request is typically not used directly when integrating with dddice.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/activate/consequatur" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/activate/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/activate/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Received response:
Request failed with error:
Wishlists
API for managing wishlists.
List Wishlist
requires authentication
List all products in a user's wishlist.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/wishlist" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/wishlist"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/wishlist',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"type": "wishlist[]",
"data": [
[],
[]
]
}
Received response:
Request failed with error:
Get from Wishlist
requires authentication
Get a particular product from a user's wishlist.
Example request:
curl --request GET \
--get "https://dddice.com/api/1.0/wishlist/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/wishlist/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://dddice.com/api/1.0/wishlist/5',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": []
}
Received response:
Request failed with error:
Add to Wishlist
requires authentication
Add a product to a user's wishlist.
Example request:
curl --request POST \
"https://dddice.com/api/1.0/wishlist/17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/wishlist/17"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://dddice.com/api/1.0/wishlist/17',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": []
}
Received response:
Request failed with error:
Delete from Wishlist
requires authentication
Remove a product from a user's wishlist.
Example request:
curl --request DELETE \
"https://dddice.com/api/1.0/wishlist/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dddice.com/api/1.0/wishlist/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://dddice.com/api/1.0/wishlist/16',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (204):
[Empty response]
Received response:
Request failed with error: