CINXE.COM

Web Service API - Developer API - Credly

<!DOCTYPE html> <html class='legacy-css' lang='en'> <head> <meta charset='UTF-8'> <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" data-document-language="true" type="text/javascript" charset="UTF-8" data-domain-script="01939cd7-7f26-7c87-af17-d2bfc69700b9" ></script> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ function OptanonWrapper() { } //]]> </script> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ window._trackJs = { token: 'e43bb3a0b11a469ba1ef2ec2b79c6b11', application: 'acclaim-production', version: '1.131.0'}; //]]> </script><script type="text/javascript" src="https://cdn.trackjs.com/releases/current/tracker.js"></script> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ (function(apiKey){ (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=[]; v=['initialize','identify','updateOptions','pageLoad'];for(w=0,x=v.length;w < x;++w)(function(m){ o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]); y=e.createElement(n);y.async=!0;y.src='https://cdn.pendo.io/agent/static/'+apiKey+'/pendo.js'; z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo'); })("65460ef3-56d0-45a3-7b3b-fe1ec0463054") //]]> </script> <meta content='Credly is a global Open Badge platform that closes the gap between skills and opportunities. We work with academic institutions, corporations, and professional associations to translate learning outcomes into digital credentials that are immediately validated, managed, and shared.' name='description'> <meta content='Credly badges, Credly, Acclaim, open badges, digital badges, badges, web-enabled credentials, Badge Alliance, Mozilla Open Badge standards, Mozilla Open Badges, verified credentials, learning outcomes' name='keywords'> <meta content='width=device-width,initial-scale=1.0' name='viewport'> <meta content='1B97012E4CB3B07611090D1A0B4D9D19' name='msvalidate.01'> <meta content='d20lZjrSJJ_n0jc1HHlADZBDmn5wZfiBDucFzzOzHCY' name='google-site-verification'> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="csHd8iwocnx-hl74LUfuODDUf24ofuiHvoYYsIXNK9_OP8hwsTOB2mgBF5s8KjGf_K-s83dDKC7LJKp7Zr2YiQ" /> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" media="all" /> <link rel="stylesheet" href="//use.typekit.net/bcc0eop.css" media="all" /> <link as='font' crossorigin='crossorigin' href='https://cdn.credly.com/assets/icons-525b616afff484c26342b59ecf539e7dbc2fa6225a9c281ed81f52e345669b40.woff2' rel='preload'> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ (function(i,s,o,g,r,a,m) { i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41547114-1', 'credly.com'); ga('require', 'displayfeatures'); ga('send', 'pageview'); //]]> </script><title>Web Service API - Developer API - Credly</title> <link rel="stylesheet" href="https://cdn.credly.com/assets/screen-24ed6a41e63909dd5bc6b6b26a86e832a0214c4193795e8e1023b11208947d11.css" media="all" /> </head> <body class=''> <div id='unsupported-browser-message'></div> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ pendo.initialize({"visitor":{},"account":{}}); //]]> </script><header id='website-header' style=''> <div class='website-header-main-links-container website-header-placeholder'></div> <div> <a href='#skip-target' id='skip-to-content'>Skip to content</a> </div> <div class='website-header-main-links-container non-react-header'> <div class='grid website-header-main-links'> <a class="acclaim-logo" href="https://www.credly.com/">Credly</a> <nav data-behavior='container' name='main_navigation'> <div class='header-nav-item header-nav-item--btn-container header-nav-item--btn-container--create-account-btn-container'> <a class='create-account-btn button white' href='/users/sign_up'> Create Account </a> </div> <div class='header-nav-item header-nav-item--btn-container header-nav-item--btn-container--sign-in-btn-container'> <a class='sign-in-btn button' href='/users/sign_in'> Sign In </a> </div> </nav> </div> </div> </header> <div class='search-bar search-bar--legacy' data-container='search-bar'></div> <div class='docs' id='flash'> <div class='grid'> <div class='l1-0 r1-0' data-behavior='flash-container'> <noscript> <div class='flash notice'> <i class='icon-error'></i> <div> We've detected that your browser has JavaScript disabled. Some features of Credly require Javascript to be enabled. For the best experience, please enable JavaScript in your browser settings or try using a different browser. </div> </div> </noscript> </div> </div> </div> <div id='docs'> <div class='grid' id='skip-target'> <div data-behavior='auto-sidebar fixed-element nav-container' id='sidebar'> <a href='#skip-nav-target' id='skip-nav'>Skip navigation</a> <nav data-behavior='section-nav'> <ul> <li> <a href="/docs">Overview</a> </li> <li> <a href="/docs/getting_started">Getting Started</a> </li> <li class='subnavigation'> <ul> <li class='active'> <a href='#architecture-diagram'>Architecture Diagram</a> </li> <li> <a href='#issuing-a-badge'>Issuing a Badge</a> </li> <li> <a href='#getting-issued-badges'>Getting Issued Badges</a> </li> <li> <a href='#revoking-a-badge'>Revoking a Badge</a> </li> </ul> </li> <li> <a href="/docs/web_service_api">Web Service API</a> </li> <li class='subnavigation'> <ul> <li class='active'> <a href='#api-conventions'>API Conventions</a> </li> <li> <a href='#api-versions'>API Versions</a> </li> <li> <a href='#url-construction'>URL Construction</a> </li> <li> <a href='#authentication'>Authentication</a> </li> <li> <a href='#viewing-auth-tokens'>Retrieving Authentication Tokens</a> </li> <li> <a href='#create-auth-tokens'>Create Authentication Tokens</a> </li> <li> <a href='#rotate-auth-tokens'>Rotate Authentication Tokens</a> </li> <li> <a href='#oauth-authentication'>OAuth2 Authentication</a> </li> <li> <a href='#web-service-responses'>Web Service Responses</a> </li> </ul> </li> <li> <a href="/docs/badge_templates">Badge Templates</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#get-badge-templates">Get Badge Templates</a></li> <li><a href="#get-a-single-badge-template">Get a Single Badge Template</a></li> </ul> </li> <li> <a href="/docs/badge_templates_extended">Badge Templates (Extended)</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#create-a-badge-template">Create a Badge Template</a></li> <li><a href="#update-a-badge-template">Update a Badge Template</a></li> <li><a href="#archive-a-badge-template">Archive a Badge Template</a></li> <li><a href="#unarchive-a-badge-template">Unarchive a Badge Template</a></li> <li><a href="#delete-a-badge-template">Delete a Badge Template</a></li> </ul> </li> <li> <a href="/docs/recommendations">Recommendations</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#list-recommendations">List Recommendations</a></li> <li><a href="#recommendation-details">Recommendation Details</a></li> <li><a href="#list-badge-templates">List Badge Templates</a></li> <li><a href="#create-badge-recommendation">Create Badge Recommendation</a></li> <li><a href="#create-url-recommendation">Create URL Recommendation</a></li> <li><a href="#update-an-existing-recommendation">Update an Existing Recommendation</a></li> <li><a href="#delete-a-recommendation">Delete a Recommendation</a></li> </ul> </li> <li> <a href="/docs/issued_badges">Issued Badges</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#issue-a-badge">Issue a Badge</a></li> <li><a href="#get-issued-badges">Get Issued Badges</a></li> <li><a href="#get-badges-in-bulk">Get Badges in Bulk</a></li> <li><a href="#replace-a-badge">Replace an Issued Badge</a></li> <li><a href="#revoke-a-badge">Revoke an Issued Badge</a></li> <li><a href="#delete-a-badge">Delete an Issued Badge</a></li> </ul> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#overview">Overview</a></li> <li><a href="#requesting-a-client-id-and-client-secret">Requesting a Client ID and Client Secret</a></li> <li><a href="#reference-client">Reference Client</a></li> <li><a href="#allowing-users-to-authorize-your-application">Allowing Users to Authorize your Application</a></li> <li><a href="#getting-an-access-token">Getting an Access Token</a></li> <li><a href="#accessing-the-credly-api">Accessing the Credly API</a></li> </ul> </li> <li> <a href="/docs/obi_specified_endpoints">OBI Specified Endpoints</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#get-badge-assertion">Get Badge Assertion</a></li> <li><a href="#get-badge-class">Get Badge Class</a></li> <li><a href="#get-issuer">Get Issuer</a></li> </ul> </li> <li> <a href="/docs/organizations">Organizations</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#list-organizations">List Organizations</a></li> <li><a href="#get-an-organization">Get an Organization</a></li> <li><a href="#update-an-organization">Update an Organization</a></li> <li><a href="#list-an-organizations-authorization-tokens">List an Organization's Authorization Tokens</a></li> </ul> </li> <li> <a href="/docs/issuer_authorizations">Issuer Authorizations</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#get-issuers">Get Issuers</a></li> <li><a href="#get-grantors">Get Grantors</a></li> <li><a href="#deauthorize-an-issuer">Deauthorize an Issuer</a></li> </ul> </li> <li> <a href="/docs/webhooks">Webhooks</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#overview">Overview</a></li> <li><a href="#configuration">Configuration</a></li> <li><a href="#event-types">Event Types</a></li> <li><a href="#example-event-detail-responses">Example Event Detail Responses</a></li> <li><a href="#examples">Examples</a></li> <li><a href="#workforce">Workforce Webhooks</a></li> </ul> </li> <li> <a href="/docs/workforce">Workforce</a> </li> <li class='subnavigation'> <ul data-container="subnavigation"> <li><a href="#get-employees">Get Employees</a></li> <li><a href="#get-a-single-employee">Get a Single Employee</a></li> <li><a href="#create-an-employee">Create an Employee</a></li> <li><a href="#update-an-employee">Update an Employee</a></li> <li><a href="#invite-an-employee">Invite an Employee</a></li> <li><a href="#delete-an-employee">Delete an Employee</a></li> <li><a href="#employee-data-api">Employee Data API</a></li> <li><a href="#employee-external-badges-api">Employee External Badges API</a></li> </ul> </li> </ul> </nav> </div> <main id='skip-nav-target'> <h1 class='toggle-nav' data-behavior='toggle-nav'>Web Service API</h1> <div class='content'> <section> <p> This document describes the Credly web service API, a REST service that allows <code>organizations</code> to manage their badges and issue badges on behalf of other <code>organizations</code>. </p> <h2 id='api-conventions'>API Conventions</h2> <ul> <li>All requests must use SSL.</li> <li>Authentication is handled via HTTP Basic Authentication as described below.</li> <li> All requests must be in JSON format with <code>Content-Type: application/json</code> </li> <li>Clients of the web service must accept JSON as response data.</li> <li>All references to static assets (e.g. image_url in Get Badges response and photo_url in List Organization responses) are subject to change. These resource locations can always be found by calling the appropriate API.</li> </ul> <h2 id='api-versions'>API Versions</h2> <ul> <li>1.0 is the current version.</li> </ul> <h3 id='backwards-compatibility'>Backwards Compatibility</h3> <p> We won't introduce backwards-incompatible changes to a specific version of the API. If backwards-incompatible changes are necessary to support new features, then a <strong>new version</strong> of the API will be introduced. When a new version is introduced, both the new version and the prior version will be supported simultaneously. The prior version of the API will eventually be deprecated and removed. </p> <p> Backwards- <strong>compatible</strong> changes include: </p> <ul> <li>Adding a new attribute to an existing object is backwards-compatible.</li> <li>Adding a new API path is backwards-compatible.</li> </ul> <p> Backwards- <strong>incompatible</strong> changes include: </p> <ul> <li>Changing or removing an existing path name is backwards-incompatible.</li> <li>Changing or removing an existing object name is backwards-incompatible.</li> <li>Changing or removing an existing attribute name is backwards-incompatible.</li> </ul> <h2 id='url-construction'>URL Construction</h2> <p>Web service URLs are constructed as follows:</p> <h4>Production Environment</h4> <pre><code>https://api.credly.com/v1/&lt;endpoint_path&gt;&#x000A;</code></pre> <h4>Sandbox Environment</h4> <p>We recommend that you develop and test your integration against our sandbox environment before moving to production. URLs for requests to the sandbox environment are constructed as follows:</p> <pre><code>https://sandbox-api.credly.com/v1/&lt;endpoint_path&gt;&#x000A;</code></pre> <h2 id='authentication'>Authentication</h2> <p>When you authenticate with an organization&#39;s Authorization Token, you only have access to that organization, its badge templates, and any badges it has issued.</p> <p> Authentication is handled via HTTP Basic Authentication with the organization's <code>authorization_token</code> as the username and a blank password. Every request requires HTTP Basic Authentication. </p> <p>Example headers for a POST request:</p> <pre><code>Accept: application/json&#x000A;Authorization: Basic SFRkYXVTanFYeWVzNUxieExPNUdadzo=&#x000A;Content-Type: application/json&#x000A;</code></pre> <p> Depending on what tool you're using to connect to the API, it may not be necessary to manually set any of these headers. For example, creating a badge template via the <code>curl</code> command line tool might look like this: </p> <pre><code>curl -u 'HTdauSjqXyes5LbxLO5GZw':'' \&#x000A; -X POST -H "Content-type: application/json" \&#x000A; -d '{"badge_template_id":"13034728-bb90-473b-ba8a-97b4fab04420",&#x000A; "issued_at":"2019-03-22T00:00:00-04:00",&#x000A; "issued_to_first_name":"test",&#x000A; "issued_to_last_name":"bunny",&#x000A; "recipient_email":"user@example.com"}' \&#x000A; https://api.credly.com/v1/organizations/08bcedcd-3f67-40e9-b857-1ed8e0a80d6d/badges&#x000A;</code></pre> <p> As this example demonstrates, the Authorization header is created by using the <code>authorization_token</code> as the HTTP username, with a blank password. For example, if the organization's <code>authorization_token</code> is <code>HTdauSjqXyes5LbxLO5GZw</code>, the Authorization header would be manually created like this: </p> <ol> <li> Create the standard username:password string with the <code>authorization_token</code> and a blank password: <code>HTdauSjqXyes5LbxLO5GZw:</code>. </li> <li> Base64 encode the username:password string: <code>base64encode("HTdauSjqXyes5LbxLO5GZw:") = "SFRkYXVTanFYeWVzNUxieExPNUdadzo="</code>. </li> <li> Create the complete Authorization header: <code>Authorization: Basic SFRkYXVTanFYeWVzNUxieExPNUdadzo=</code>. </li> </ol> <p> Again, this process may be taken care of for your by whatever tool you are using, such as <code>curl</code>, a REST client library, etc. </p> <p> The <code>authorization_token</code> grants full permission to the web service API on behalf of the organization, therefore the <code>authorization_token</code> should be treated with the same sensitivity as an admin password. Administrators can view their organization's authorization tokens within Organization Management under the Developers section. </p> <h2 id='viewing-auth-tokens'>Retrieving Authorization Tokens</h2> <p> Authorization token information can be obtained via an API call. Note that if you use an authentication token that does not have write or delete permissions, the list of returned authentication tokens will be truncated to show only the read-only tokens. </p> <h4>Request</h4> <pre><code>GET v1/organizations/&lt;organization_id&gt;/authorization_tokens</code></pre> <h4>Response</h4> <pre><code>{&#x000A; "data": [&#x000A; {&#x000A; "id": "eec89e5a-d9fa-44f4-ae71-22fad2e58d8c",&#x000A; "token": "RnsDbkhD31hw7u2WnNymVEDgn3k123443H1w3",&#x000A; "owner_id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "description": "A new token for use",&#x000A; "write_enabled": true,&#x000A; "read_enabled": true,&#x000A; "delete_enabled": true,&#x000A; "created_at": "2020-05-28T16:44:41.034Z",&#x000A; "expires_at": "2025-01-14T20:54:48.303Z",&#x000A; "owner": {&#x000A; "type": "Organization",&#x000A; "id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "name": "Acclaim",&#x000A; "url": "https://www.credly.com/api/v1/organizations/88cf96b7-e4ca-4a17-b938-a72bf2b9c273"&#x000A; }&#x000A; },&#x000A; {&#x000A; "id": "11ec08c1-acc4-46ce-a111-df3d8f92f092",&#x000A; "token": "dSPftsJqS9KiwueFdfhXalfYGsB0HEgGAdkM",&#x000A; "owner_id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "description": "A token to be used for external integrations.",&#x000A; "write_enabled": true,&#x000A; "read_enabled": true,&#x000A; "delete_enabled": true,&#x000A; "created_at": "2020-06-03T22:43:10.192Z",&#x000A; "expires_at": "2024-12-25T17:21:29.841Z",&#x000A; "owner": {&#x000A; "type": "Organization",&#x000A; "id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "name": "Acclaim",&#x000A; "url": "https://www.credly.com/api/v1/organizations/88cf96b7-e4ca-4a17-b938-a72bf2b9c273"&#x000A; }&#x000A; }&#x000A; ],&#x000A; "metadata": {&#x000A; "count": 2,&#x000A; "current_page": 1,&#x000A; "total_count": 2,&#x000A; "total_pages": 1,&#x000A; "per": 50,&#x000A; "previous_page_url": null,&#x000A; "next_page_url": null&#x000A; }&#x000A; }</code></pre> <h2 id='create-auth-tokens'>Creating Authorization Tokens via API</h2> <p> New authorization tokens may be created by using an existing token with write permissions. This has no affect on the token used to perform the request. The new token will have a default expiration of 180 days. </p> <h4>Request</h4> <pre><code>POST v1/organizations/&lt;organization_id&gt;/authorization_tokens</code></pre> <h4>Optional body parameter to include a new description</h4> <pre><code>{&#x000A; "description": "rotating the token in 2024"&#x000A;}&#x000A;</code></pre> <h4>Response</h4> <pre><code>{&#x000A; "data": {&#x000A; "id": "eec89e5a-d9fa-44f4-ae71-22fad2e58d8c",&#x000A; "token": "{NEWLY GENERATED AUTHORIZATION TOKEN}",&#x000A; "owner_id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "description": "rotating the token in 2024",&#x000A; "write_enabled": true,&#x000A; "read_enabled": true,&#x000A; "delete_enabled": true,&#x000A; "created_at": "2020-05-28T16:44:41.034Z",&#x000A; "expires_at": "2025-01-14T16:06:53.658Z",&#x000A; "owner": {&#x000A; "type": "Organization",&#x000A; "id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "name": "Acclaim",&#x000A; "url":&#x000A; "https://www.credly.com/api/v1/organizations/88cf96b7-e4ca-4a17-b938-a72bf2b9c273"&#x000A; }&#x000A; },&#x000A; "metadata": {}&#x000A; }</code></pre> <h2 id='rotate-auth-tokens'>Rotating Authorization Tokens via API</h2> <p> Authorization tokens are set to expire after a default of 180 days. To facilitate the rotation of authorization tokens, the Credly API allows tokens to be rotated via POST call. Upon rotating the authorization token, a new token will be generated and returned and the token used to ake the request will immediately be unavailable for use. </p> <h4>Request</h4> <pre><code>POST v1/organizations/&lt;organization_id&gt;/authorization_tokens/rotate</code></pre> <h4>Optional body parameter to include a new description</h4> <pre><code>{&#x000A; "description": "rotating the token in 2024"&#x000A;}&#x000A;</code></pre> <h4>Response</h4> <pre><code>{&#x000A; "data": {&#x000A; "id": "eec89e5a-d9fa-44f4-ae71-22fad2e58d8c",&#x000A; "token": "{NEWLY GENERATED AUTHORIZATION TOKEN}",&#x000A; "owner_id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "description": "rotating the token in 2024",&#x000A; "write_enabled": true,&#x000A; "read_enabled": true,&#x000A; "delete_enabled": true,&#x000A; "created_at": "2020-05-28T16:44:41.034Z",&#x000A; "expires_at": "2025-01-14T16:06:53.658Z",&#x000A; "owner": {&#x000A; "type": "Organization",&#x000A; "id": "88cf96b7-e4ca-4a17-b938-a72bf2b9c273",&#x000A; "name": "Acclaim",&#x000A; "url":&#x000A; "https://www.credly.com/api/v1/organizations/88cf96b7-e4ca-4a17-b938-a72bf2b9c273"&#x000A; }&#x000A; },&#x000A; "metadata": {}&#x000A; }</code></pre> <h2 id='oauth-authentication'>OAuth2 Authentication</h2> <p> Credly supports authentication via OAuth2 Client Credentials grant. The first step in using OAuth authentication is to request that your Organization be configured to be configured to allow OAuth2 authentication. You will then be provided with your Client Id and Client Secret. </p> <h4>Production Environment OAUth Token Request URL</h4> <pre><code>https://www.credly.com/oauth/token</code></pre> <h4>Sandbox Environment OAUth Token Request URL</h4> <pre><code>https://sandbox.credly.com/oauth/token</code></pre> <p> Credly supports the following Scopes that must be requested when obtaining the OAuth 2 token: <o> <li>issued_badges - For the Issued Badges Endpoint</li> <li>badge_templates - For the Badge Templates Endpoint</li> <li>recommendations - For the Recommendations Endpoint</li> <li>workforce - For the Workforce Endpoint</li> <li>events - For the Events Endpoint</li> </o> </p> <p>Token request body example:</p> <pre><code>{&#x000A; "grant_type": "client_credentials",&#x000A; "scope": "desired scopes",&#x000A; "client_id": "client id for your application",&#x000A; "client_secret": "client secret for your application"&#x000A;}&#x000A;</code></pre> <p>Example authorization request headers:</p> <pre><code>Accept: application/json&#x000A;Authorization: Bearer UC0RjBMkAQtKgWBNvjWWHiSoy1ax5tv0VgnwM2nw8KQ&#x000A;Content-Type: application/json&#x000A;</code></pre> <h2 id='web-service-responses'>Web Service Responses</h2> <table> <thead> <tr> <th>Request</th> <th>Result</th> <th>Status Code</th> <th>Response Body</th> </tr> </thead> <tbody> <tr> <td>GET</td> <td>Success</td> <td>200 (OK)</td> <td>The JSON resource</td> </tr> <tr> <td>GET</td> <td>Not found</td> <td>404 (Not Found)</td> <td>{ message: "Resource not found." }</td> </tr> <tr> <td>POST</td> <td>Success</td> <td>201 (Created)</td> <td>The JSON resource with its URL in the Location header</td> </tr> <tr> <td>PUT</td> <td>Success</td> <td>200 (OK)</td> <td>The JSON resource</td> </tr> <tr> <td>POST/PUT</td> <td>Missing required parameter</td> <td>400 (Bad Request)</td> <td>{ message: "Missing required parameter: email" }</td> </tr> <tr> <td>POST/PUT</td> <td>Validation failed</td> <td>422 (Unprocessable Entity)</td> <td>{ message: "Email address is invalid" }</td> </tr> <tr> <td>Any</td> <td>Unexpected error</td> <td>500 (Internal Server Error)</td> <td>{ message: "Oops. Something went wrong, but no details are available." }</td> </tr> </tbody> </table> <h3 id='wrapped-responses'>Wrapped Responses</h3> <p>The web service wraps responses with the following format:</p> <pre><code class='json'>{&#x000A; data: {&#x000A; &lt;response data&gt;&#x000A; },&#x000A; metadata: {&#x000A; &lt;response metadata&gt;&#x000A; }&#x000A;}&#x000A;</code></pre> <p> Only certain responses contain <code>&lt;response metadata&gt;</code>. It's used for returning relevant info for paged results. In particular, Badge Templates and Issued Badges responses are paged and include <code>&lt;response metadata&gt;</code>. Refer to the documentation for those endpoints for details. </p> <h3 id='common-errors'>Common Errors</h3> <p>If you get the response...</p> <table> <thead> <tr> <th>Response</th> <th>Then...</th> </tr> </thead> <tbody> <tr> <td> <code>{ "message": "You need to sign in before continuing." }</code> </td> <td>...you need to specify the correct Authorization header.</td> </tr> <tr> <td> <code>{ "message": "You have to confirm your account before continuing." }</code> </td> <td>...you must confirm your account by responding to the confirmation email you received.</td> </tr> <tr> <td> <code>{ "message": "Your account is locked. Please contact us for assistance." }</code> </td> <td>...your account is locked.</td> </tr> <tr> <td> <code>{ "message": "Your account was not activated yet." }</code> </td> <td>...your account is disabled.</td> </tr> </tbody> </table> <h3 id='validation-failures'>Validation Failures</h3> <p> The web service will validate data when creating and updating a resource. If validation fails, the server will return a <code>422</code> status code with a list of attributes that failed validation. The <code>message</code> value will contain a comma-separated list of validation errors, and an array of errors and their respective attribute names will also be included. For example: </p> <pre><code class='json'>{&#x000A; data: {&#x000A; "message": "Validation failed: Email can't be blank, ...",&#x000A; "errors": [&#x000A; {&#x000A; "attribute": "email",&#x000A; "messages": [&#x000A; "can't be blank",&#x000A; ...&#x000A; ]&#x000A; },&#x000A; ...&#x000A; ]&#x000A; }&#x000A;}&#x000A;</code></pre> </section> </div> </main> </div> </div> <div data-container='global-search-results'></div> <footer id='footer' style=''> <div class='grid non-react-footer'> <section class='l1-0 r1-0 footer-margin'> <div class='links'> <div class='footer-link-wrapper'> <a class="footer-link" href="https://resources.credly.com/schedule-a-demo">Request Demo</a> </div> <div class='footer-link-wrapper'> <a class="footer-link" href="https://info.credly.com/about-us">About Credly</a> </div> <div class='footer-link-wrapper'> <a class="footer-link" href="https://info.credly.com/legal">Terms</a> </div> <div class='footer-link-wrapper'> <a class="footer-link" href="https://info.credly.com/privacy-policy">Privacy</a> </div> <div class='footer-link-wrapper'> <a class="footer-link" href="/docs">Developers</a> </div> <div class='footer-link-wrapper'> <a class="footer-link" target="_blank" href="/support">Support</a> </div> </div> <div class='cookie-links'> <div class='cookie-link-wrapper'> <a class="footer-link" target="_blank" href="https://info.credly.com/cookie-policy">Cookies</a> </div> <div class='cookie-link-wrapper'> <a class="footer-link" target="_blank" href="https://info.credly.com/cookie-policy">Do Not Sell My Personal Information</a> </div> </div> <div class='app-store-links'> <a class='app-store-link app-store-link-google' href='https://play.google.com/store/apps/details?id=com.credly.android'></a> <a class='app-store-link app-store-link-apple' href='https://apps.apple.com/us/app/credly/id1630234370'></a> </div> </section> </div> </footer> <div aria-live='assertive' class='sr-only' data-behavior='screen-reader-announcements' role='alert'> <span></span> </div> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ (function(){ document.addEventListener('click', function(e){ var eventTarget = e.target; if (eventTarget.id == 'skip-to-content' || eventTarget.id == 'skip-nav'){ var href, target; href = eventTarget.getAttribute('href').substr(1); target = document.getElementById(href); if (!target.getAttribute('tabindex')){ target.setAttribute('tabindex', '-1'); } target.focus(); } }); })(); //]]> </script><script src="https://cdn.credly.com/assets/legacy_application-ed3230df6745b5785532c292eb69a9a503dab0bd052d50fa449666a59577540f.js" crossorigin="anonymous"></script> <script src="https://cdn.credly.com/assets/utilities/set_time_zone_cookie-aca1fcb79ea4e90d8e963d7850b867a9bbeb077b05a6cad141c1ce7d945fd20d.js" crossorigin="anonymous"></script> <script src="https://cdn.credly.com/assets/utilities/set_supported_browser_flag-4358d3fc13a018a9a17a468d8a96f4ea4cb8b3489224d4c4e3fc6b23b9e09f45.js" crossorigin="anonymous"></script> <script nonce="OSgc33BuN1Lc1ZHI6xDr09tW8czR6Sd9B/6qqSUjTd4="> //<![CDATA[ (function(){ if (typeof(App) !== 'undefined' && App.Behaviors && App.Behaviors.TrackStat) { App.Behaviors.TrackStat.init( {"url":"https:\/\/stats.credly.com\/stats\/interaction","request_data":{"session_id":"64c75971-0a00-4fff-8ac5-f6dee07895a1","flexible_params_auth":["snapshot_json","stat_object_id","stat_object_type","stat_type"],"auth_version":"1.0","auth_key":"user:8d768abb-4e6a-4f38-8cb3-86dc95196f75","auth_timestamp":"1739796812","auth_signature":"3315533a120171529330baefe5a0e9f9e39fdd2c5d3102e844b967a923796ee5"}}, null ); } })(); //]]> </script><script src="https://cdn.credly.com/assets/utilities/warn_unsupported_browsers-74a87b5eae33bb6b05d13d276a337fcfb531f763344fa6bb30b70ecbf01cb3e2.js" crossorigin="anonymous"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10