The Raygun API is REST-oriented and uses JSON for sending and receiving. You can manually publish errors to Raygun using this interface, or use it to create your own provider. All calls are made over HTTPS.

API Endpoint


The header must contain "X-ApiKey" with a value that is a valid ApiKey (available from the user's dashboard).

URI Summary


  • Entries: /entries

The body of the message should be JSON with the following structure:

	"occurredOn": string,
	"details": {
		"machineName": string,
		"version": string,
		"client": {
			"name": string,
			"version": string,
			"clientUrl": string
		"error": {
			"innerError": string,
			"data": object,
			"className": string,
			"message": string,
			"stackTrace": [
				"lineNumber": number,
				"className": string,
				"fileName": string,
				"methodName": string
                "breadcrumbs": [{
                        "message": string,
                        "category": string,
                        "customData": object,
                        "timestamp": number,
                        "level": number,
                        "type": string
		"environment": {
			"processorCount": number,
			"osVersion": string ,
			"windowBoundsWidth": number,
			"windowBoundsHeight": number,
			"resolutionScale": string,
			"currentOrientation": string,
			"cpu": string,
			"packageVersion": string,
			"architecture": string,			
			"totalPhysicalMemory": number,
			"availablePhysicalMemory": number,
			"totalVirtualMemory": number,
			"availableVirtualMemory": number,
			"diskSpaceFree": array,
			"deviceName": string,
			"locale": string
		"tags": array,
		"userCustomData": object,
		"request": {
			"hostName": string,
			"url": string,
			"httpMethod": string,
			"iPAddress": string,
			"queryString": object,
			"form": object,
			"headers": object,
			"rawData": object
		"response": {
			"statusCode": number 
		"user": {
			"identifier": string 
		"context": {
			"identifier": string 

HTTP Status Codes

202 OK - Message accepted.

400 Bad message - could not parse the provided JSON. Check all fields are present, especially both occurredOn (ISO 8601 DateTime) and details { } at the top level.

403 Invalid API Key - The value specified in the header X-ApiKey did not match with a user.


  • OccurredOn must be present, and is a DateTime string in the ISO 8601 format, in the UTC timezone. This is of the format:


  • For the field details.request.form, we request that you truncate the names and values to 256 characters each. For rawData, this should be truncated to 4096 bytes.

  • rawData is to be set in the case where the method is non-GET, and the Content-Type is not text/html and not application/x-www-form-urlendcoded.

  • There must be at least one details.error, and its stacktrace must have its linenumber set. The other fields can be empty.

  • details.request.form should be the raw form data available from a request-type object when the HTTP method is 'POST' and the Content-Type is 'application/x-www-form-urlencoded'.

  • For the details.environment fields where that data is unavailable from your language, framework or environment, these can safely be absent from the payload (or set to null).

  • User: identifier should be a string representation of the currently logged in user - their username or email address. If an email address is supplied their Gravatar (if one exists) will be shown.

  • Context: identifier should represent the current app context, if applicable (generally for devices). This should be a random UUID (v4) that changes upon restart.

  • The only required field for a breadcrumb is "message"

  • breadcrumbs.timestamp must be a unix datetime

  • breadcrumbs.level can be one of 0 (debug), 1 (info), 2 (warning), or 3 (error)

  • breadcrumbs.location must be in the format "ClassName:methodName:lineNo", optional from the left (ie "ClassName" and "ClassName:methodName" are valid but "methodName:lineNo" is not)

Change log

  • 28th April 2017 - Added Breadcrumbs
  • 6th November 2013 - Removed request.httpStatusCode and added response.statusCode.