SpaceCRM Send API Tutorial
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.

Getting started
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Your first API call
POST /v1/emails with body: { from, to, subject, html }. A 200 response returns { id: 'msg_xxx', status: 'queued' }. Works the same in Python and PHP. The from address must match your configured sending domain.
In Node.js, use the built-in fetch API or any HTTP client like axios. The request is a standard REST call with a JSON body. No SDK installation is required β the API follows OpenAPI standards and works with any language that supports HTTP requests.
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Using SMTP as an alternative
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
SMTP is ideal for legacy systems where rewriting HTTP calls isn't practical. The relay handles IP warmup, reputation monitoring, and bounce processing automatically. Delivery rates match the REST API β both routes use the same sending infrastructure.
Choose the REST API when building new integrations β it provides richer event data, webhook callbacks, and batch sending capabilities. Choose SMTP when integrating with existing applications that already have SMTP clients configured.
Handling webhook events
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Process hard bounces immediately by adding the address to your suppression list. Suppress complained addresses from all future sends β even one complaint after suppression triggers sending limits from inbox providers.
Use webhook events to trigger business logic in your application. For example, when email.delivered fires, update your CRM status. When email.bounced fires, notify the account owner. Event-driven architecture keeps your systems synchronized without polling.
Error handling and production best practices
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Confirm current SpaceCRM availability, plan limits, permissions, and behavior in current product documentation or with the product owner before relying on this capability.
Use sandbox mode for development and testing. The sandbox environment sends to test addresses without consuming your sending quota or affecting your domain reputation. Switch to production only after your integration is fully tested and validated.