API General Information

URL Parts 

An API request should include the endpoint followed by the company key. For example:

Please note the endpoint is based on your Metacompliance tenants data centre:

HTTP Request Header Parameters 

  • Your subscription and company keys will be provided by your MetaCompliance Technical representative. 
  • If prompted with Access Web Content, click OK

  • Select Anonymous and proceed.

Response Codes 
The following are response codes returned by the various MyCompliance APIs:

200 – OK 
This is the expected result for successful requests 

400 – Bad Request
Indicates invalid or missing data.

  • Ensure the correct Company Key, as supplied by your technical representative, is included in the request.
  • The Company Key should be supplied as a parameter, for example: {{url}}/Main/GetCompanyUsage?Key={{comp_key}} 
  • You may also see this response if required parameters (such as courseId) are missing. In this case, the response will include the message: Request is invalid.

401 – Access Denied
Access denied due to an invalid subscription key.

  • Make sure to provide a valid key for an active subscription.
  • Ensure the correct Subscription Key, as supplied by your technical representative, is included in the request header: Ocp-Apim-Subscription-Key

404 – Resource Not Found
The requested resource could not be found.

  • Verify the request URL and ensure you are using the correct API (e.g. Main, Policy, Phish, or Learning).

429 – Too Many Requests
The rate limit has been exceeded.

  • Confirm the applicable rate limit and product details with your Customer Success or technical representative.
Back to all articles