MENU navbar-image

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

This API is authenticated by sending 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": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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": "consequatur_sapiente",
            "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": "Blanditiis numquam ea ut incidunt adipisci non et assumenda. Velit consequuntur ut necessitatibus quisquam rem expedita ducimus. Vero quisquam a fuga ullam ratione quo.",
            "user": {
                "username": "sed_iure",
                "uuid": "0f4c9bbf-c7de-11ed-9829-00224849bf5e",
                "name": "Arden Bergnaum",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        {
            "meshes": {
                "d4": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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_ad",
            "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": "Ipsa molestias itaque dolorem nostrum qui quidem. Illo vel ipsam et et non sapiente alias. Quia quos saepe sit blanditiis voluptatem et voluptatem. Quis ea eligendi doloribus iste tempore quisquam dolorem.",
            "user": {
                "username": "culpa_laborum",
                "uuid": "0f4dfbf1-c7de-11ed-9829-00224849bf5e",
                "name": "Marielle Dare II",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    ]
}
                 

Request      

GET api/1.0/theme

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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=ratione" \
    --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=expedita" \
    --form "assets[]=@/tmp/phpBhwu6s" 
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', 'ratione');
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', 'expedita');
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' => 'ratione'
            ],
            [
                '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' => 'expedita'
            ],
            [
                'name' => 'assets[]',
                'contents' => fopen('/tmp/phpBhwu6s', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):

                                        
                    {
    "data": {
        "meshes": {
            "d4": "https://dddice.com/mesh/d04.fbx",
            "d6": "https://dddice.com/mesh/d06.fbx",
            "d8": "https://dddice.com/mesh/d08.fbx",
            "d10": "https://dddice.com/mesh/d10.fbx",
            "d10x": "https://dddice.com/mesh/d10.fbx",
            "d12": "https://dddice.com/mesh/d12.fbx",
            "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-2.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-3.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                "on": "roll.loading",
                "value": 2
            },
            {
                "src": "https://dddice.com/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": "unde_rem",
        "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": "Necessitatibus et voluptate minima voluptatem quam. Enim et dolores eveniet amet rem corrupti. Nisi voluptatem alias et.",
        "user": {
            "username": "ad_non",
            "uuid": "0f54fb3c-c7de-11ed-9829-00224849bf5e",
            "name": "Pascale Schmeler",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "created_at": "2023-03-21T11:46:47.000000Z",
        "updated_at": "2023-03-21T11:46:47.000000Z"
    }
}
                 

Request      

POST api/1.0/theme

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

frag_shader   string  optional  

Custom fragment shader Example: ratione

manifest   string   

Theme manifest configuration Example: {"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"}

api_version   string   

API compatibility version, always 1.0 for now no-example Example: ut

description   string   

Theme description no-example Example: Labore qui fugit nostrum voluptatibus in consequuntur doloribus.

id   string   

A unique machine readable id in slug format no-example Example: animi

label   labelObject   

The label used in the interface using the manifest.name no-example Example: beatae

background_color   string   

Color hex string for label's background color no-example Example: esse

color   string   

Color hex string for the label's text no-example Example: optio

name   string   

Name of the theme no-example Example: eos

version   string   

Semver 2.0.0 version number no-example Example: optio

available_dice   (string|object)[]  optional  

List of dice types available in this theme, if not supplied a standard set of d4, d6, d8, d10, d10x, d12, d20 is assumed, if an array of strings, the string is used for id, type and notation. ex. ["d4", "d6", "d8", "d10", "d10x", "d12", "d20"] or [{"id":"d3", "type":"d6", "notation":"d3"},{"id":"fudge", "type":"d6", "notation":"dF"}] no-example

id   string  optional  

ID used to refer to this die in the rest of the manifest no-example Example: et

notation   string  optional  

The abbreviated notation for this dice to display in die equations. ex. d6, dF, d%, d20 no-example Example: aut

type   string  optional  

The physical shape of the dice. ex. d4, d6, d8, d10, d10x, d12, d20 no-example Example: fugit

extend   string  optional  

The id of a theme to use as a base for this theme. Any optional parameters not supplied will inherit their values from this theme Example: nihil

meshes   object  optional  

The file names of the fbx files that describe the meshes; keyed by available_dice ids

sizes   object  optional  

Sizes of each die, 1 is the default size; keyed by available_dice ids

sounds   soundObject[]  optional  

Sounds that play no-example

<something>   any  optional  

Whatever other parameters the roll event supports. ex. value for event die.value. Will play that sound only when that value is rolled.

on   string  optional  

Dice roll event to play the sound on ex. die.collide, die.value no-example Example: et

src   string|object  optional  

Filename of the sound file, or a src object. The src object is keyed by available_dice ids and contains one sound file name per die. Supported types are wav and mp3 no-example Example: impedit

textures   textureObject[]  optional  

Array of textures to be used in the shader no-example

binding   string  optional  

Name of the texture uniform used by the shader. ex. map, bumpMap, u_numberMap no-example Example: rerum

src   string|object  optional  

The file name of the texture, or a src object. The src object is keyed by available_dice ids and contains one texture file name per die no-example Example: consequatur

uniforms   object  optional  

Non-texture uniforms to pass to the shader; keyed by the uniform's name

<uniform-name>   object  optional  
max   number  optional  

Max value for float aka "f" uniforms, specifying a min & max value will add a slider to the dice editor for this uniform that slides between min and max, defaulting to value

min   number  optional  

Min value for float aka "f" uniforms, specifying a min & max value will add a slider to the dice editor for this uniform that slides between min and max, defaulting to value

type   string  optional  

The uniforms type. A color can be specified as a hex color string, or as a vector in linear color space. If the type is "color" it will be added to the dice editor for editing. If the color is specified as vec3 or vec4 it will be hidden from the editor. ex. 'f' for float, 'color' for a color, vec3, vec4

value   number|string|object|array  optional  

The value of the uniform. ex. 1.0, "#FF00FF", [0.5,0.3,0.6], {"r":1, "g":0, "b":1}, {"x":0.3, "y":0.2, "z": 0.3}

values   object  optional  

Numerical, textual or image values of the faces of the dice to be shown in roll results; keyed by available_dice ids

<id>   (number|string|object)[]  optional  

The array of dice values, in order, by face number. ex. 1, "crit", {"src":"success.svg"}

vert_shader   string  optional  

Custom vertex shader Example: expedita

assets   File[]  optional  

Associated theme assets, filenames must match manifest.json references

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-standard" \
    --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-standard"
);

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-standard',
    [
        '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": "https://dddice.com/mesh/d04.fbx",
            "d6": "https://dddice.com/mesh/d06.fbx",
            "d8": "https://dddice.com/mesh/d08.fbx",
            "d10": "https://dddice.com/mesh/d10.fbx",
            "d10x": "https://dddice.com/mesh/d10.fbx",
            "d12": "https://dddice.com/mesh/d12.fbx",
            "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-2.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-3.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                "on": "roll.loading",
                "value": 2
            },
            {
                "src": "https://dddice.com/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": "impedit_neque",
        "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": "Laborum sed enim vel occaecati non ducimus. Eveniet veritatis corrupti ea suscipit ut odio odit molestiae. Omnis a ducimus ab natus quo reiciendis. Ut sed sequi minus quisquam.",
        "user": {
            "username": "aut_quos",
            "uuid": "0f57ba89-c7de-11ed-9829-00224849bf5e",
            "name": "Miss Laurine Padberg",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "created_at": "2023-03-21T11:46:47.000000Z",
        "updated_at": "2023-03-21T11:46:47.000000Z"
    }
}
                 

Request      

GET api/1.0/theme/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

Delete Theme

requires authentication

Delete all versions of a given theme.

Example request:
curl --request DELETE \
    "https://dddice.com/api/1.0/theme/dddice-standard" \
    --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-standard"
);

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-standard',
    [
        '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]
                 

Request      

DELETE api/1.0/theme/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

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-standard/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-standard/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-standard/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": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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": "optio_sequi",
            "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": "Libero occaecati voluptates quae repellendus quod recusandae. Quas explicabo quibusdam nisi nam suscipit. Ad molestiae expedita ut voluptatem in omnis et earum.",
            "user": {
                "username": "esse_ipsam",
                "uuid": "0f5bb0f7-c7de-11ed-9829-00224849bf5e",
                "name": "Prof. Margarett Veum",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        {
            "meshes": {
                "d4": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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": "officiis_laboriosam",
            "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": "Vitae sapiente nulla quis optio quia. Necessitatibus perferendis non assumenda eaque rerum. Esse est est quidem. Iure nostrum debitis blanditiis aliquid.",
            "user": {
                "username": "in_aperiam",
                "uuid": "0f5cf8d5-c7de-11ed-9829-00224849bf5e",
                "name": "Dedrick Kirlin",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    ]
}
                 

Request      

GET api/1.0/theme/{id}/version

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

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-standard/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-standard/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-standard/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": "https://dddice.com/mesh/d04.fbx",
            "d6": "https://dddice.com/mesh/d06.fbx",
            "d8": "https://dddice.com/mesh/d08.fbx",
            "d10": "https://dddice.com/mesh/d10.fbx",
            "d10x": "https://dddice.com/mesh/d10.fbx",
            "d12": "https://dddice.com/mesh/d12.fbx",
            "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-2.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-3.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                "on": "roll.loading",
                "value": 2
            },
            {
                "src": "https://dddice.com/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": "soluta_officiis",
        "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": "Voluptas itaque illo sed dignissimos quos. Earum quaerat sed beatae iste nulla rerum. Rerum porro voluptatum debitis.",
        "user": {
            "username": "corporis_necessitatibus",
            "uuid": "0f60810a-c7de-11ed-9829-00224849bf5e",
            "name": "Prof. Jay Bartoletti MD",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "created_at": "2023-03-21T11:46:47.000000Z",
        "updated_at": "2023-03-21T11:46:47.000000Z"
    }
}
                 

Request      

GET api/1.0/theme/{id}/version/{version}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

version   string   

Theme Version. Example: 1.0.0

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-standard/version/vel" \
    --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-standard/version/vel"
);

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-standard/version/vel',
    [
        '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]
                 

Request      

DELETE api/1.0/theme/{id}/version/{version}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

version   string   

The version. Example: vel

Report Theme

requires authentication

Report a theme for abuse or spam.

Example request:
curl --request POST \
    "https://dddice.com/api/1.0/theme/dddice-standard/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-standard/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-standard/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]
                 

Request      

POST api/1.0/theme/{id}/report

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the theme. Example: dddice-standard

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" \
    --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 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',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "type": "room[]",
    "data": [
        {
            "name": "Untitled Room",
            "is_public": true,
            "bg_file_path": null,
            "slug": "Jt-Fxbs",
            "passcode": "nobis",
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "mollitia_magni",
                "uuid": "0eeac150-c7de-11ed-9829-00224849bf5e",
                "name": "Dr. Leopold Kemmer III",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "participants": [
                {
                    "id": 2,
                    "username": "tempore_velit",
                    "color": "#5270d6",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "nam_itaque",
                        "uuid": "0eeb2ea6-c7de-11ed-9829-00224849bf5e",
                        "name": "Cydney Mitchell",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                },
                {
                    "id": 3,
                    "username": "numquam_est",
                    "color": "#b3c89d",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "facere_esse",
                        "uuid": "0eeba45f-c7de-11ed-9829-00224849bf5e",
                        "name": "Miss Kenya Bechtelar Jr.",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                }
            ]
        },
        {
            "name": "Untitled Room",
            "is_public": true,
            "bg_file_path": null,
            "slug": "88M3QkB",
            "passcode": "sit",
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "non_nobis",
                "uuid": "0eed9be7-c7de-11ed-9829-00224849bf5e",
                "name": "Brad Kautzer",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "participants": [
                {
                    "id": 4,
                    "username": "dolorem_sapiente",
                    "color": "#ad2430",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "at_et",
                        "uuid": "0eedf131-c7de-11ed-9829-00224849bf5e",
                        "name": "Mikayla Schroeder",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                },
                {
                    "id": 5,
                    "username": "similique_enim",
                    "color": "#74a072",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "et_deleniti",
                        "uuid": "0eee4f70-c7de-11ed-9829-00224849bf5e",
                        "name": "Catharine Wiegand",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                }
            ]
        }
    ]
}
                 

Request      

GET api/1.0/room

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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\": \"dignissimos\",
    \"passcode\": \"et\"
}"
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": "dignissimos",
    "passcode": "et"
};

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' => 'dignissimos',
            'passcode' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):

                                        
                    {
    "data": {
        "name": "Untitled Room",
        "is_public": true,
        "bg_file_path": null,
        "slug": "qiiK3mb",
        "passcode": "aliquid",
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "neque_natus",
            "uuid": "0ef2e483-c7de-11ed-9829-00224849bf5e",
            "name": "Mr. Sofia White III",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "participants": []
    }
}
                 

Request      

POST api/1.0/room

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

is_public   boolean  optional  

Public or private Example: true

name   string  optional  

Name Example: dignissimos

passcode   string  optional  

Passcode required for private rooms Example: et

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/nihil?passcode=officia" \
    --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/nihil"
);

const params = {
    "passcode": "officia",
};
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/nihil',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'passcode' => 'officia',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "data": {
        "name": "Untitled Room",
        "is_public": true,
        "bg_file_path": null,
        "slug": "FOKLLdw",
        "passcode": "consequatur",
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "consequatur_consequatur",
            "uuid": "0ef5bc62-c7de-11ed-9829-00224849bf5e",
            "name": "Heaven Terry",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "participants": []
    }
}
                 

Request      

GET api/1.0/room/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: nihil

Query Parameters

passcode   string  optional  

Passcode required for private room Example: officia

Update a Room

requires authentication

Update the name of a room

Example request:
curl --request PATCH \
    "https://dddice.com/api/1.0/room/qui" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "is_public=" \
    --form "name=et" \
    --form "passcode=" \
    --form "background=@/tmp/phpTJnAFm" 
const url = new URL(
    "https://dddice.com/api/1.0/room/qui"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('is_public', '');
body.append('name', 'et');
body.append('passcode', '');
body.append('background', document.querySelector('input[name="background"]').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/qui',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'is_public',
                'contents' => ''
            ],
            [
                'name' => 'name',
                'contents' => 'et'
            ],
            [
                'name' => 'passcode',
                'contents' => ''
            ],
            [
                'name' => 'background',
                'contents' => fopen('/tmp/phpTJnAFm', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "data": {
        "name": "Untitled Room",
        "is_public": true,
        "bg_file_path": null,
        "slug": "b61eCQt",
        "passcode": "qui",
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "omnis_nesciunt",
            "uuid": "0ef9cccf-c7de-11ed-9829-00224849bf5e",
            "name": "Mireille Collier",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "participants": []
    }
}
                 

Request      

PATCH api/1.0/room/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: qui

Body Parameters

is_public   boolean  optional  

Public or private Example: false

name   string  optional  

Name Example: et

passcode   boolean  optional  

Passcode required for private rooms Example: false

background   file  optional  

Must be a file. Example: /tmp/phpTJnAFm

Delete a Room

requires authentication

Delete a room you own.

Example request:
curl --request DELETE \
    "https://dddice.com/api/1.0/room/commodi" \
    --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/commodi"
);

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/commodi',
    [
        '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]
                 

Request      

DELETE api/1.0/room/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: commodi

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\": true,
        \"is_cleared\": false
    }
}"
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": true,
        "is_cleared": false
    }
};

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' => true,
                'is_cleared' => false,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "type": "roll[]",
    "data": [
        {
            "direction": 180,
            "velocity": 1,
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "magnam_libero",
                "uuid": "0efe0494-c7de-11ed-9829-00224849bf5e",
                "name": "Mazie Will",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "room": {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "cumque",
                "slug": "hQUQRl6",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z",
                "deleted_at": null,
                "participants": [
                    {
                        "id": 9,
                        "username": "corporis_omnis",
                        "color": "#6048ce",
                        "position": 0,
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z",
                        "user": {
                            "username": "numquam_quis",
                            "uuid": "0efee80f-c7de-11ed-9829-00224849bf5e",
                            "name": "Fiona Hackett",
                            "created_at": "2023-03-21T11:46:46.000000Z",
                            "updated_at": "2023-03-21T11:46:46.000000Z"
                        }
                    }
                ]
            },
            "values": [
                {
                    "uuid": "0f000e49-c7de-11ed-9829-00224849bf5e",
                    "is_hidden": false,
                    "is_user_value": true,
                    "is_visible": true,
                    "is_cleared": true,
                    "is_dropped": false,
                    "value": 7,
                    "value_to_display": "7",
                    "type": "d20",
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z"
                }
            ],
            "total_value": 7,
            "equation": "1d20",
            "external_id": null,
            "participants": []
        },
        {
            "direction": 180,
            "velocity": 1,
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "esse_eveniet",
                "uuid": "0f01a357-c7de-11ed-9829-00224849bf5e",
                "name": "Columbus Jast",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "room": {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "aut",
                "slug": "J1d6kE7",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z",
                "deleted_at": null,
                "participants": [
                    {
                        "id": 10,
                        "username": "eos_ex",
                        "color": "#993da4",
                        "position": 0,
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z",
                        "user": {
                            "username": "quo_expedita",
                            "uuid": "0f02798f-c7de-11ed-9829-00224849bf5e",
                            "name": "Fritz Zboncak",
                            "created_at": "2023-03-21T11:46:46.000000Z",
                            "updated_at": "2023-03-21T11:46:46.000000Z"
                        }
                    }
                ]
            },
            "values": [
                {
                    "uuid": "0f035086-c7de-11ed-9829-00224849bf5e",
                    "is_hidden": false,
                    "is_user_value": false,
                    "is_visible": true,
                    "is_cleared": false,
                    "is_dropped": false,
                    "value": 20,
                    "value_to_display": "20",
                    "type": "d20",
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z"
                }
            ],
            "total_value": 20,
            "equation": "1d20",
            "external_id": null,
            "participants": []
        }
    ]
}
                 

Request      

PATCH api/1.0/room/{slug}/roll

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   integer   

The slug of the room. Example: 1

Body Parameters

dice   object   

Partial dice roll.

is_visible   boolean  optional  

Roll value hidden Example: true

is_cleared   boolean  optional  

Roll value cleared Example: false

Join a Room

requires authentication

Join a room as a participant

Example request:
curl --request POST \
    "https://dddice.com/api/1.0/room/quibusdam/participant" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"passcode\": \"deleniti\"
}"
const url = new URL(
    "https://dddice.com/api/1.0/room/quibusdam/participant"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "passcode": "deleniti"
};

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/quibusdam/participant',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'passcode' => 'deleniti',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "data": {
        "name": "Untitled Room",
        "is_public": true,
        "bg_file_path": null,
        "slug": "fvZ_EcP",
        "passcode": "et",
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "voluptas_ex",
            "uuid": "0f07c025-c7de-11ed-9829-00224849bf5e",
            "name": "Crystel Johns",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "participants": []
    }
}
                 

Request      

POST api/1.0/room/{slug}/participant

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: quibusdam

Body Parameters

passcode   string  optional  

Passcode required for private room Example: deleniti

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/ab/participant/repellendus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"passcode\": \"sapiente\",
    \"username\": \"nemo\",
    \"color\": \"#FF0000\"
}"
const url = new URL(
    "https://dddice.com/api/1.0/room/ab/participant/repellendus"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "passcode": "sapiente",
    "username": "nemo",
    "color": "#FF0000"
};

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/ab/participant/repellendus',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'passcode' => 'sapiente',
            'username' => 'nemo',
            'color' => '#FF0000',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "data": {
        "name": "Untitled Room",
        "is_public": true,
        "bg_file_path": null,
        "slug": "5xxpGak",
        "passcode": "cum",
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "deserunt_facilis",
            "uuid": "0f0b6b2f-c7de-11ed-9829-00224849bf5e",
            "name": "Delta Schaden II",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "participants": []
    }
}
                 

Request      

PATCH api/1.0/room/{slug}/participant/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: ab

id   string   

Participant ID Example: repellendus

Body Parameters

passcode   string  optional  

Passcode required for private room Example: sapiente

username   string  optional  

Update a participant's username Example: nemo

color   string  optional  

Update a participant's color. Example: #FF0000

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/reprehenderit/participant/distinctio" \
    --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/reprehenderit/participant/distinctio"
);

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/reprehenderit/participant/distinctio',
    [
        '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]
                 

Request      

DELETE api/1.0/room/{slug}/participant/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the room. Example: reprehenderit

id   string   

The ID of the participant. Example: distinctio

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\"
        }
    ],
    \"external_id\": \"perferendis\",
    \"operator\": {
        \"k\": \"\\\"h2\\\"\",
        \"p\": \"occaecati\",
        \"rr\": \"cumque\",
        \"ro\": \"ipsa\",
        \"ra\": \"aut\",
        \"e\": \"quia\",
        \"mi\": 1,
        \"ma\": 8151725.2072
    },
    \"room\": \"HvvOlTl\",
    \"whisper\": [
        124309.615
    ],
    \"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"
        }
    ],
    "external_id": "perferendis",
    "operator": {
        "k": "\"h2\"",
        "p": "occaecati",
        "rr": "cumque",
        "ro": "ipsa",
        "ra": "aut",
        "e": "quia",
        "mi": 1,
        "ma": 8151725.2072
    },
    "room": "HvvOlTl",
    "whisper": [
        124309.615
    ],
    "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],
                ],
                'external_id' => 'perferendis',
                'operator' => [
                    'k' => '"h2"',
                    'p' => 'occaecati',
                    'rr' => 'cumque',
                    'ro' => 'ipsa',
                    'ra' => 'aut',
                    'e' => 'quia',
                    'mi' => 1.0,
                    'ma' => 8151725.2072,
                ],
                'room' => 'HvvOlTl',
                'whisper' => [
                    124309.615,
                ],
                'label' => '"Longbow damage with Hunter\'s Mark"',
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):

                                        
                    {
    "data": {
        "direction": 180,
        "velocity": 1,
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "necessitatibus_illum",
            "uuid": "0f15cfbf-c7de-11ed-9829-00224849bf5e",
            "name": "Zachariah Rath IV",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "room": {
            "is_public": true,
            "name": "Untitled Room",
            "bg_file_path": null,
            "passcode": "sint",
            "slug": "oaIg6xJ",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "deleted_at": null,
            "participants": [
                {
                    "id": 13,
                    "username": "fugiat_ut",
                    "color": "#fe0a0e",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "cupiditate_beatae",
                        "uuid": "0f17270b-c7de-11ed-9829-00224849bf5e",
                        "name": "Augusta Ruecker",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                }
            ]
        },
        "values": [
            {
                "uuid": "0f1803da-c7de-11ed-9829-00224849bf5e",
                "is_hidden": false,
                "is_user_value": false,
                "is_visible": true,
                "is_cleared": true,
                "is_dropped": false,
                "value": 6,
                "value_to_display": "6",
                "type": "d10",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            }
        ],
        "total_value": 6,
        "equation": "1d10",
        "external_id": null,
        "participants": []
    }
}
                 

Request      

POST api/1.0/roll

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

dice   object[]   

List of dice rolls.

is_hidden   boolean  optional  

Example: true

theme   string   

Theme ID Example: impedit

type   string   

Type of dice. Valid types are D20, D12, D10, D8, D6, and D4. Example: totam

label   string  optional  

Example: qui

value   number  optional  

Dice value. If no value is provided, dddice will generate a value using our balanced random number generator. Example: 2.24706

value_to_display   string|object  optional  

This can be used to replace the numeric value. This is useful in cases where a D20 might contain letters instead of numbers or if a player is speaking in tongues or hieroglyphs. Example: eos

external_id   string  optional  

An ID for this roll generated by an external system. Example: perferendis

operator   object  optional  

Optional operators to manipulate the final value of the dice

k   string  optional  

Keep all matched values. Example: "h2"

p   string  optional  

Drop all matched values (Not yet implemented) Example: occaecati

rr   string  optional  

Reroll all matched values until none match (Not yet implemented) Example: cumque

ro   string  optional  

Reroll all matched values once (Not yet implemented) Example: ipsa

ra   string  optional  

Reroll up to one matched value once, keeping the original roll (Not yet implemented) Example: aut

e   string  optional  

Explode, rolls another die for each matched value (Not yet implemented) Example: quia

mi   number  optional  

Set a minimum value for each die (Not yet implemented) Example: 1

ma   number  optional  

Set a maximum value for each die (Not yet implemented) Example: 8151725.2072

room   string  optional  

Room slug. Example: HvvOlTl

whisper   number[]  optional  

Participant IDs to whisper this roll to. Only participants specified will see this roll.

label   string  optional  

Optional label for this roll. Example: "Longbow damage with Hunter's Mark"

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)

equation   string   

d20 dice syntax equation

total_value   number   

Sum of all roll value totals

created_at   string   

Created timestamp

updated_at   string   

Updated timestamp

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/et" \
    --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/et"
);

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/et',
    [
        '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": {
        "direction": 180,
        "velocity": 1,
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "est_praesentium",
            "uuid": "0f1bb704-c7de-11ed-9829-00224849bf5e",
            "name": "Miss Vilma Maggio DVM",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "room": {
            "is_public": true,
            "name": "Untitled Room",
            "bg_file_path": null,
            "passcode": "occaecati",
            "slug": "DuPFa2a",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "deleted_at": null,
            "participants": [
                {
                    "id": 14,
                    "username": "sed_rerum",
                    "color": "#fd8845",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "earum_officiis",
                        "uuid": "0f1ca040-c7de-11ed-9829-00224849bf5e",
                        "name": "Miss Norene Brakus IV",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                }
            ]
        },
        "values": [
            {
                "uuid": "0f1d7963-c7de-11ed-9829-00224849bf5e",
                "is_hidden": true,
                "is_user_value": true,
                "is_visible": true,
                "is_cleared": false,
                "is_dropped": false,
                "value": 2,
                "value_to_display": "2",
                "type": "d8",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            }
        ],
        "total_value": 2,
        "equation": "1d8",
        "external_id": null,
        "participants": []
    }
}
                 

Request      

GET api/1.0/roll/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Roll ID Example: et

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/doloribus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"room\": \"quisquam\",
    \"dice\": [
        {
            \"uuid\": \"1\",
            \"is_hidden\": true
        }
    ]
}"
const url = new URL(
    "https://dddice.com/api/1.0/roll/doloribus"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "room": "quisquam",
    "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/doloribus',
    [
        '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,
                    ],
                ],
            ],
            [
                'room' => 'quisquam',
                'dice' => [
                    $o[0],
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "data": {
        "direction": 180,
        "velocity": 1,
        "updated_at": "2023-03-21T11:46:46.000000Z",
        "created_at": "2023-03-21T11:46:46.000000Z",
        "user": {
            "username": "ut_eos",
            "uuid": "0f2147c1-c7de-11ed-9829-00224849bf5e",
            "name": "Cleta Cummings",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z"
        },
        "room": {
            "is_public": true,
            "name": "Untitled Room",
            "bg_file_path": null,
            "passcode": "tempora",
            "slug": "kefO5b4",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "deleted_at": null,
            "participants": [
                {
                    "id": 15,
                    "username": "quisquam_voluptatem",
                    "color": "#79f36e",
                    "position": 0,
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z",
                    "user": {
                        "username": "delectus_tempora",
                        "uuid": "0f2233d2-c7de-11ed-9829-00224849bf5e",
                        "name": "Deja Orn V",
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z"
                    }
                }
            ]
        },
        "values": [
            {
                "uuid": "0f230fe7-c7de-11ed-9829-00224849bf5e",
                "is_hidden": false,
                "is_user_value": false,
                "is_visible": false,
                "is_cleared": false,
                "is_dropped": false,
                "value": 6,
                "value_to_display": "6",
                "type": "d20",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            }
        ],
        "total_value": 6,
        "equation": "1d20",
        "external_id": null,
        "participants": []
    }
}
                 

Request      

PATCH api/1.0/roll/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Roll ID Example: doloribus

Body Parameters

room   string  optional  

Example: quisquam

dice   object[]   

List of partial dice rolls.

uuid   string   

Example: a272911c-cb70-328b-88a5-23232ee715df

is_visible   boolean  optional  

Roll value hidden Example: true

is_cleared   boolean  optional  

Roll value cleared Example: true

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 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\": \"b0e45a0a-9bee-30a6-9f36-84b15fec92d9\",
                    \"is_visible\": true,
                    \"is_cleared\": 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": "b0e45a0a-9bee-30a6-9f36-84b15fec92d9",
                    "is_visible": true,
                    "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/roll',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'rolls' => [
                [
                    'dice' => [
                        [
                            'uuid' => 'b0e45a0a-9bee-30a6-9f36-84b15fec92d9',
                            'is_visible' => true,
                            'is_cleared' => true,
                        ],
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "type": "roll[]",
    "data": [
        {
            "direction": 180,
            "velocity": 1,
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "magni_aut",
                "uuid": "0f273c97-c7de-11ed-9829-00224849bf5e",
                "name": "Prof. Dayna Grimes PhD",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "room": {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "cum",
                "slug": "ymKIYbx",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z",
                "deleted_at": null,
                "participants": [
                    {
                        "id": 16,
                        "username": "qui_et",
                        "color": "#419fc2",
                        "position": 0,
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z",
                        "user": {
                            "username": "numquam_eum",
                            "uuid": "0f2821cd-c7de-11ed-9829-00224849bf5e",
                            "name": "Anya Bartoletti",
                            "created_at": "2023-03-21T11:46:46.000000Z",
                            "updated_at": "2023-03-21T11:46:46.000000Z"
                        }
                    }
                ]
            },
            "values": [
                {
                    "uuid": "0f28fa87-c7de-11ed-9829-00224849bf5e",
                    "is_hidden": false,
                    "is_user_value": true,
                    "is_visible": false,
                    "is_cleared": false,
                    "is_dropped": false,
                    "value": 6,
                    "value_to_display": "6",
                    "type": "d10",
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z"
                }
            ],
            "total_value": 6,
            "equation": "1d10",
            "external_id": null,
            "participants": []
        },
        {
            "direction": 180,
            "velocity": 1,
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "provident_quia",
                "uuid": "0f2a8253-c7de-11ed-9829-00224849bf5e",
                "name": "Winston Kovacek",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "room": {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "rerum",
                "slug": "nHpzf9u",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z",
                "deleted_at": null,
                "participants": [
                    {
                        "id": 17,
                        "username": "aut_adipisci",
                        "color": "#58342e",
                        "position": 0,
                        "created_at": "2023-03-21T11:46:46.000000Z",
                        "updated_at": "2023-03-21T11:46:46.000000Z",
                        "user": {
                            "username": "sed_amet",
                            "uuid": "0f2b5fba-c7de-11ed-9829-00224849bf5e",
                            "name": "Theodore Lowe",
                            "created_at": "2023-03-21T11:46:46.000000Z",
                            "updated_at": "2023-03-21T11:46:46.000000Z"
                        }
                    }
                ]
            },
            "values": [
                {
                    "uuid": "0f2c3752-c7de-11ed-9829-00224849bf5e",
                    "is_hidden": false,
                    "is_user_value": false,
                    "is_visible": true,
                    "is_cleared": false,
                    "is_dropped": false,
                    "value": 20,
                    "value_to_display": "20",
                    "type": "d20",
                    "created_at": "2023-03-21T11:46:46.000000Z",
                    "updated_at": "2023-03-21T11:46:46.000000Z"
                }
            ],
            "total_value": 20,
            "equation": "1d20",
            "external_id": null,
            "participants": []
        }
    ]
}
                 

Request      

PATCH api/1.0/roll

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

rolls   object[]   

List of rolls.

uuid   required  optional  

Roll ID Example: 8340ef32-8a69-33e7-9d48-ecda88aaa680

dice   object[]   

List of partial dice rolls.

is_visible   boolean  optional  

Roll value hidden Example: false

is_cleared   boolean  optional  

Roll value cleared Example: true

room   string  optional  

Example: aspernatur

Share Dice

API for managing share requests.

List Share Requests

requires authentication

Fetch a list of active and inactive share requests.

Example request:
curl --request GET \
    --get "https://dddice.com/api/1.0/share" \
    --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/share"
);

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/share',
    [
        '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": "share[]",
    "data": [
        {
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "assumenda_excepturi",
                "uuid": "0f302a04-c7de-11ed-9829-00224849bf5e",
                "name": "Rhea Luettgen",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "theme": {
                "slug": "laborum_illo",
                "is_available": true,
                "is_extendable": 1,
                "is_discoverable": 1,
                "name": "Mr.",
                "description": "Nihil impedit nulla repudiandae in consequatur earum recusandae. Velit perferendis qui sed corporis aut. Excepturi molestiae quidem quo id dolor omnis. Inventore a soluta aut distinctio. Eum optio qui quas fugit enim.",
                "form_state": null,
                "deleted_at": null,
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            }
        },
        {
            "updated_at": "2023-03-21T11:46:46.000000Z",
            "created_at": "2023-03-21T11:46:46.000000Z",
            "user": {
                "username": "in_consequuntur",
                "uuid": "0f31a5e3-c7de-11ed-9829-00224849bf5e",
                "name": "Howard Senger",
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            },
            "theme": {
                "slug": "aliquid_quasi",
                "is_available": true,
                "is_extendable": 1,
                "is_discoverable": 1,
                "name": "Ms.",
                "description": "Id aspernatur et dolorem ipsam id quas. Autem iure molestiae qui omnis odio sequi.",
                "form_state": null,
                "deleted_at": null,
                "created_at": "2023-03-21T11:46:46.000000Z",
                "updated_at": "2023-03-21T11:46:46.000000Z"
            }
        }
    ]
}
                 

Request      

GET api/1.0/share

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Share Request

requires authentication

Create a share request for a given theme.

Example request:
curl --request POST \
    "https://dddice.com/api/1.0/share" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"dddice-standard\",
    \"limit\": 14,
    \"expires_at\": \"iusto\"
}"
const url = new URL(
    "https://dddice.com/api/1.0/share"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "dddice-standard",
    "limit": 14,
    "expires_at": "iusto"
};

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/share',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'slug' => 'dddice-standard',
            'limit' => 14,
            'expires_at' => 'iusto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):

                                        
                    {
    "data": {
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "user": {
            "username": "eius_natus",
            "uuid": "0f345c73-c7de-11ed-9829-00224849bf5e",
            "name": "Carlie Rice",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "theme": {
            "slug": "soluta_consequatur",
            "is_available": true,
            "is_extendable": 1,
            "is_discoverable": 1,
            "name": "Mrs.",
            "description": "Illum atque ut illum aut nihil. Eius ipsam totam ratione deleniti. Debitis iste tempora incidunt autem aliquid fugiat maxime.",
            "form_state": null,
            "deleted_at": null,
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    }
}
                 

Request      

POST api/1.0/share

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

slug   string   

Theme slug. Example: dddice-standard

limit   integer  optional  

Number of times this share request can be accepted Example: 14

expires_at   string  optional  

Expiration date or datetime Example: iusto

Get Share Request

requires authentication

Get information about a share request.

Example request:
curl --request GET \
    --get "https://dddice.com/api/1.0/share/ea" \
    --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/share/ea"
);

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/share/ea',
    [
        '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": {
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "user": {
            "username": "qui_veritatis",
            "uuid": "0f36a45c-c7de-11ed-9829-00224849bf5e",
            "name": "Leonardo Hahn",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "theme": {
            "slug": "velit_repellat",
            "is_available": true,
            "is_extendable": 1,
            "is_discoverable": 1,
            "name": "Ms.",
            "description": "Aliquam occaecati et velit sit corrupti beatae. Fuga maxime modi eius aut voluptatem laboriosam. Voluptatum dolor sint perferendis eos qui voluptas. Natus voluptas sit ipsum non autem architecto doloremque.",
            "form_state": null,
            "deleted_at": null,
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    }
}
                 

Request      

GET api/1.0/share/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the share request Example: ea

Update Share Request

requires authentication

Update information about a share request.

Example request:
curl --request PATCH \
    "https://dddice.com/api/1.0/share/cum" \
    --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/share/cum"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    'https://dddice.com/api/1.0/share/cum',
    [
        '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": {
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "user": {
            "username": "est_alias",
            "uuid": "0f38c62c-c7de-11ed-9829-00224849bf5e",
            "name": "Mr. Melvina Pfeffer",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "theme": {
            "slug": "corporis_dolores",
            "is_available": true,
            "is_extendable": 1,
            "is_discoverable": 1,
            "name": "Ms.",
            "description": "Vero porro reiciendis molestiae assumenda repellat distinctio porro. Ex recusandae nam explicabo excepturi culpa quibusdam. Placeat quasi tempore voluptatum itaque quas odio. Doloribus cupiditate est sed voluptatem minima.",
            "form_state": null,
            "deleted_at": null,
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    }
}
                 

Request      

PATCH api/1.0/share/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the share request Example: cum

Delete Share Request

requires authentication

Delete a share request which will invalidate any shared URLs

Example request:
curl --request DELETE \
    "https://dddice.com/api/1.0/share/hic" \
    --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/share/hic"
);

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/share/hic',
    [
        '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]
                 

Request      

DELETE api/1.0/share/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the share request Example: hic

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.

Example request:
curl --request POST \
    "https://dddice.com/api/1.0/share/numquam" \
    --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/share/numquam"
);

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/share/numquam',
    [
        '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": {
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "user": {
            "username": "sapiente_sed",
            "uuid": "0f3bcbbe-c7de-11ed-9829-00224849bf5e",
            "name": "Mr. Kane Oberbrunner",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "theme": {
            "slug": "distinctio_odio",
            "is_available": true,
            "is_extendable": 1,
            "is_discoverable": 1,
            "name": "Mrs.",
            "description": "Dolor qui non non quia rem. Delectus repudiandae magni aut quibusdam ea. Nostrum numquam eaque consequatur est quae sint.",
            "form_state": null,
            "deleted_at": null,
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    }
}
                 

Request      

POST api/1.0/share/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the share request Example: numquam

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": "Cyril Mayert",
        "username": "dolorem_neque",
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "rooms": [
            {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "autem",
                "slug": "XgLtBwR",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z",
                "deleted_at": null
            }
        ]
    }
}
                 

Request      

GET api/1.0/user

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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 1 account/24-hour.

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": "Miss Rosalind Skiles",
        "username": "sapiente_cupiditate",
        "updated_at": "2023-03-21T11:46:47.000000Z",
        "created_at": "2023-03-21T11:46:47.000000Z",
        "rooms": [
            {
                "is_public": true,
                "name": "Untitled Room",
                "bg_file_path": null,
                "passcode": "est",
                "slug": "uo1PuNX",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z",
                "deleted_at": null
            }
        ]
    }
}
                 

Request      

POST api/1.0/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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\": \"non\"
}"
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": "non"
};

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' => 'non',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):

                                        
                    {
    "type": "token",
    "data": "<your-new-api-token>"
}
                 

Request      

POST api/1.0/user/token

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

Example: non

Delete API Key

requires authentication

Example request:
curl --request DELETE \
    "https://dddice.com/api/1.0/user/token/iure" \
    --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/iure"
);

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/iure',
    [
        '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]
                 

Request      

DELETE api/1.0/user/token/{token}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Token Example: iure

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=similique&ids=vel" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"limit\": 2011286.0096872,
    \"filter\": \"est\"
}"
const url = new URL(
    "https://dddice.com/api/1.0/dice-box"
);

const params = {
    "filter": "similique",
    "ids": "vel",
};
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": 2011286.0096872,
    "filter": "est"
};

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' => 'similique',
            'ids' => 'vel',
        ],
        'json' => [
            'limit' => 2011286.0096872,
            'filter' => 'est',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                                        
                    {
    "type": "theme[]",
    "data": [
        {
            "meshes": {
                "d4": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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": "vel_consequatur",
            "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": "Eos sequi esse optio tempora sit ad. Voluptate labore quia dolores molestias quas. Quis sequi maiores quo expedita saepe dicta.",
            "user": {
                "username": "quidem_nesciunt",
                "uuid": "0f3eddba-c7de-11ed-9829-00224849bf5e",
                "name": "Jillian Monahan",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        {
            "meshes": {
                "d4": "https://dddice.com/mesh/d04.fbx",
                "d6": "https://dddice.com/mesh/d06.fbx",
                "d8": "https://dddice.com/mesh/d08.fbx",
                "d10": "https://dddice.com/mesh/d10.fbx",
                "d10x": "https://dddice.com/mesh/d10.fbx",
                "d12": "https://dddice.com/mesh/d12.fbx",
                "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-2.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-3.mp3",
                    "on": "die.collide"
                },
                {
                    "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                    "on": "roll.loading",
                    "value": 2
                },
                {
                    "src": "https://dddice.com/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": "aut_placeat",
            "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": "Aut ipsam odit eos rerum fugit veniam. Quis dolorem vel sit et et aut rem exercitationem. Voluptatem sit dolor sit voluptas ut molestiae.",
            "user": {
                "username": "consequuntur_quia",
                "uuid": "0f40510c-c7de-11ed-9829-00224849bf5e",
                "name": "Deanna Pfeffer",
                "created_at": "2023-03-21T11:46:47.000000Z",
                "updated_at": "2023-03-21T11:46:47.000000Z"
            },
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        }
    ]
}
                 

Request      

GET api/1.0/dice-box

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter   string  optional  

Filter themes by name Example: similique

ids   string  optional  

Comma seperated list of themes IDs to get Example: vel

Body Parameters

limit   number  optional  

Example: 2011286.0096872

filter   string  optional  

Example: est

Get Dice Box Theme

requires authentication

Get information about a theme in your Digital Dice Box.

Example request:
curl --request GET \
    --get "https://dddice.com/api/1.0/dice-box/impedit" \
    --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/impedit"
);

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/dice-box/impedit',
    [
        '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": "https://dddice.com/mesh/d04.fbx",
            "d6": "https://dddice.com/mesh/d06.fbx",
            "d8": "https://dddice.com/mesh/d08.fbx",
            "d10": "https://dddice.com/mesh/d10.fbx",
            "d10x": "https://dddice.com/mesh/d10.fbx",
            "d12": "https://dddice.com/mesh/d12.fbx",
            "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-2.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-3.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                "on": "roll.loading",
                "value": 2
            },
            {
                "src": "https://dddice.com/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": "ex_omnis",
        "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": "Quia odio enim et quis. Expedita recusandae aperiam non et est. Eum fugit dolorum qui minima perferendis dolor in a. Non non iste voluptatem sed provident voluptatem.",
        "user": {
            "username": "aspernatur_sint",
            "uuid": "0f448e03-c7de-11ed-9829-00224849bf5e",
            "name": "Dr. Claire Kub I",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "created_at": "2023-03-21T11:46:47.000000Z",
        "updated_at": "2023-03-21T11:46:47.000000Z"
    }
}
                 

Request      

GET api/1.0/dice-box/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the dice box. Example: impedit

id   string   

The ID of the theme. Example: dddice-standard

Update Dice Box Theme

requires authentication

Upgrade theme version in your Digital Dice Box.

Example request:
curl --request PATCH \
    "https://dddice.com/api/1.0/dice-box/necessitatibus" \
    --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/necessitatibus"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    'https://dddice.com/api/1.0/dice-box/necessitatibus',
    [
        '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": "https://dddice.com/mesh/d04.fbx",
            "d6": "https://dddice.com/mesh/d06.fbx",
            "d8": "https://dddice.com/mesh/d08.fbx",
            "d10": "https://dddice.com/mesh/d10.fbx",
            "d10x": "https://dddice.com/mesh/d10.fbx",
            "d12": "https://dddice.com/mesh/d12.fbx",
            "d20": "https://dddice.com/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": "https://dddice.com/sounds/roll-1.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-2.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-3.mp3",
                "on": "die.collide"
            },
            {
                "src": "https://dddice.com/sounds/roll-loading-sm.mp3",
                "on": "roll.loading",
                "value": 2
            },
            {
                "src": "https://dddice.com/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": "beatae_saepe",
        "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": "Qui natus id aut numquam. Quis in et rerum molestiae. Ex voluptas repudiandae dolorum quia aliquam aut. Harum laboriosam occaecati corrupti.",
        "user": {
            "username": "corrupti_exercitationem",
            "uuid": "0f4730ef-c7de-11ed-9829-00224849bf5e",
            "name": "Prof. Yesenia Powlowski",
            "created_at": "2023-03-21T11:46:47.000000Z",
            "updated_at": "2023-03-21T11:46:47.000000Z"
        },
        "created_at": "2023-03-21T11:46:47.000000Z",
        "updated_at": "2023-03-21T11:46:47.000000Z"
    }
}
                 

Request      

PATCH api/1.0/dice-box/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the dice box. Example: necessitatibus

id   string   

The ID of the theme. Example: dddice-standard

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/amet" \
    --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/amet"
);

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/amet',
    [
        '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]
                 

Request      

DELETE api/1.0/dice-box/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the dice box. Example: amet

id   string   

The ID of the theme. Example: dddice-standard