Skip to main content

Overview

Agd Ejar API allows your application to manage properties, contracts, and interact with Saudi Arabia’s Ejar platform through a simplified interface. Our API consolidates complex Ejar operations into simple, efficient calls.

Authentication

All API requests must include your API key in the Authorization header. You can obtain your API credentials by contacting our support team.

Configuration Examples

AGDEJAR_URL="https://app.agdejar.sa"
API_KEY="your_api_key_here"

curl --location --request POST "$AGDEJAR_URL/oauth/token" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "grant_type": "client_credentials",
    "client_id": "your_client_id",
    "client_secret": "your_client_secret",
    "scope": "read"
  }'

Quick Start Guide

  1. Get API Credentials
    • Contact support to obtain your API credentials
    • You’ll receive a client_id and client_secret
  2. Authentication
  3. Make Your First Request
    • Try listing properties or searching for a deed
    • Check response formats and handle errors appropriately

Base URL

All API requests should be made to:
https://app.agdejar.sa

Request Headers

All requests should include:
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Accept: application/json

Response Format

All responses are returned in JSON format. A typical success response looks like:
{
  "data": {
    // Response data here
  },
  "meta": {
    // Metadata, pagination info, etc.
  }
}

Error Handling

The API uses conventional HTTP response codes:
CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
500Server Error - Please contact support
Error response format:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error message",
    "details": {
      // Additional error details
    }
  }
}

Rate Limiting

Contact support for information about rate limits for your specific use case.

Need Help?

If you need assistance: