Service agreement template
A service (outsourcing) agreement whose preamble and clauses flow in from Markdown across pages, ending with the execution date and name-and-seal boxes for both parties. The clauses are generic examples to be adapted to each deal.
- Company names, people, addresses and amounts in the sample are fictional.
- Clauses and fields are general examples. Review the content against applicable laws and your own terms.
- The sample layout is in Japanese. You can change any text in the template editor.

Use cases
- Outsourcing and maintenance agreements
- Issuing contract PDFs from a contract management system
- Contracts with terms tailored to each business partner
Merge fields
The data fields you send to the API. Fields inside an array are shown as array.field.
| Field | Description |
|---|---|
title | Document title (heading and running header) |
document_number | Contract number |
body | Preamble and clauses in Markdown (article headings, paragraphs, lists) |
signed_at | Date of execution (YYYY-MM-DD) |
party_a.address | Party A (client) address |
party_a.name | Party A (client) name |
party_a.representative | Party A representative |
party_b.address | Party B (contractor) address |
party_b.name | Party B (contractor) name |
party_b.representative | Party B representative |
How to use it
- In the dashboard, choose Create template, select "Start from a template" and pick "Service agreement". The layout and sample data are copied into your project.
- Edit the company name, logo and field positions in the template editor to match your own format.
- Send the template name and data to
POST /v1/rendersto issue a PDF.
With a test API key (sk_test_) you can issue documents from the draft. Publish a version before issuing with a production API key. From an AI assistant, specify the same template in the from of the MCP create_template tool.
Create and issue via the API
Create a template by setting from to the template ID (outsourcing-contract) in POST /v1/templates, then send the template name and data to POST /v1/renders.
curl https://api.docrelay.jp/v1/templates \
-H "Authorization: Bearer $DOCRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Service agreement", "from": "outsourcing-contract" }'curl https://api.docrelay.jp/v1/renders \
-H "Authorization: Bearer $DOCRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d @outsourcing-contract.json \
-o outsourcing-contract.pdf{
"template": "Service agreement",
"format": "pdf",
"data": {
"title": "業務委託契約書",
"document_number": "契約番号 C-2026-0312",
"signed_at": "2026-11-20",
"party_a": {
"address": "東京都千代田区見本町1-2-3",
"name": "サンプル商事株式会社",
"representative": "代表取締役 見本 太郎"
},
"party_b": {
"address": "大阪府大阪市北区例示町4-5-6",
"name": "株式会社見本製作所",
"representative": "代表取締役 例示 次郎"
},
"body": "サンプル商事株式会社(以下「甲」という。)と株式会社見本製作所(以下「乙」という。)は、甲が乙に委託する業務に関し、次の…"
}
}Early access is open
We are preparing for launch. Pre-register and we will notify you when the service becomes available.



