API Integration Guide

This guide will help you integrate with the ArcusX REST API to build applications and automate workflows.


API Overview

The ArcusX API is a RESTful API that provides access to platform functionality including:

  • User authentication and management

  • Task creation and management

  • Proposal submission and review

  • Escrow contract operations

  • Payment processing

  • Dispute resolution

  • Messaging and notifications

  • Administrative operations

Base URL

  • Development: http://arcusx.pro/api

  • Production: https://arcusx.pro/api

All endpoints are prefixed with /auth/ for authenticated routes.

Authentication

ArcusX uses JWT (JSON Web Tokens) for authentication. Most endpoints require a valid JWT token in the Authorization header.

Getting a Token

Login Endpoint

Response

Using the Token

Include the token in the Authorization header:

Token Expiration

JWT tokens expire after a set period. Handle 401 responses by redirecting to login or refreshing the token.

Request Format

Headers

All requests should include:

Request Body

POST and PUT requests should send JSON:

Response Format

Success Response

Error Response

HTTP Status Codes

  • 200 OK: Request successful

  • 201 Created: Resource created successfully

  • 400 Bad Request: Invalid request data

  • 401 Unauthorized: Authentication required or invalid token

  • 403 Forbidden: Insufficient permissions

  • 404 Not Found: Resource not found

  • 500 Internal Server Error: Server error

Common Endpoints

Authentication

Login

Register

Register Wallet

Tasks

Get Tasks

Create Task

Get Task Details

Apply to Task

Escrow

Create Escrow

Get Escrow Status

Messages

Get Messages

Send Message

Code Examples

JavaScript/TypeScript

PHP

Python

Error Handling

Always implement proper error handling:

Rate Limiting

Currently, ArcusX does not enforce strict rate limits, but:

  • Implement reasonable request throttling in your application

  • Cache responses when appropriate

  • Avoid excessive polling

  • Respect server resources

Best Practices

Security

  • Never expose JWT tokens in client-side code (if public)

  • Store tokens securely (localStorage for web apps, secure storage for mobile)

  • Use HTTPS in production

  • Validate all input data

  • Sanitize user inputs

Performance

  • Implement response caching

  • Use pagination for large datasets

  • Minimize unnecessary requests

  • Batch operations when possible

Reliability

  • Implement retry logic for failed requests

  • Handle network timeouts

  • Gracefully handle API errors

  • Provide user feedback for long operations

Testing

Using Postman

  1. Import API endpoints into Postman

  2. Set up environment variables (base URL, token)

  3. Create collection with authentication pre-request script

  4. Test all endpoints

Using cURL

Next Steps

  • Review Complete API Reference

  • Learn about Stellar Integration

  • Explore Escrow Operations

  • Study Authentication Details

Happy integrating!

Last updated