Create Item
Create a new Item. You can create a contract, account or ethtopic with each one the items has different properties.
Request
POST https://api.arkhia.io/events/hedera/create/:item/:x-api-key
HEADERS
x-api-secret | string | The Api Secret retrieved from an Arkhia project
PARAMETERS
item | string | `contract` or `ethtopic` or `account`
x-api-key | string | The Api Key retrieved from an Arkhia project
BODY PAYLOAD
item_id | string | `contract` or `account` -> hedera_item_id , `ethtopic` as an eth topic network_id | number | `295` (mainnet) or `296` (testnet)
HEADERS
x-api-secret | string | The Api Secret retrieved from an Arkhia project
PARAMETERS
item | string | `contract` or `ethtopic` or `account`
x-api-key | string | The Api Key retrieved from an Arkhia project
BODY PAYLOAD
item_id | string | `contract` or `account` -> hedera_item_id , `ethtopic` as an eth topic network_id | number | `295` (mainnet) or `296` (testnet)
Response
- Operational [200]
{
status: true,
response: {
id: 'clodtgmle000nf50iyf4f8t3i',
item_id: '0.0.5802863',
user_id: 'clod75irl0001fj0i1453nzwd',
network_id: 296,
type_id: 1,
enabled: false,
json_settings: { metadata: [Object], balance: [Object], expiration: [Object] },
status: 'QUEUED',
created_at: '2023-10-31T04:16:06.983Z',
updated_at: '2023-10-31T04:16:06.983Z',
job_health_timestamp: '1970-01-01T00:00:00.000Z',
request_fetch_limit: 100
}
}
Code Examples
cURL Examples
- cURL
- Node Js
Create Account Event Settings
# Mainnet Account
curl -X POST "https://api.arkhia.io/events/hedera/create/account/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.123456",
"network_id": 295
}
}'
# Testnet Account
curl -X POST "https://api.arkhia.io/events/hedera/create/account/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.123456",
"network_id": 296
}
}'
Create Contract Event Settings
# Mainnet Contract
curl -X POST "https://api.arkhia.io/events/hedera/create/contract/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.789012",
"network_id": 295
}
}'
# Testnet Contract
curl -X POST "https://api.arkhia.io/events/hedera/create/contract/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.789012",
"network_id": 296
}
}'
Create EthTopic Event Settings
# Mainnet EthTopic
curl -X POST "https://api.arkhia.io/events/hedera/create/ethtopic/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0x1234567890123456789012345678901234567890123456789012345678901234",
"network_id": 295
}
}'
# Testnet EthTopic
curl -X POST "https://api.arkhia.io/events/hedera/create/ethtopic/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0x1234567890123456789012345678901234567890123456789012345678901234",
"network_id": 296
}
}'
const axios = require('axios');// Create Contract Event Settingsconst createContractEvents = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/create/contract/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret } }; const bodyPayload = { scoutSettings: { item_id: '0.0.3931201', network_id: 296 } } try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}// Create Account Event Settingsconst createAccountEvents = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/create/account/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret } }; const bodyPayload = { scoutSettings: { item_id: '0.0.123456', network_id: 295 } } try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}// Create EthTopic Event Settingsconst createEthTopicEvents = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/create/ethtopic/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret } }; const bodyPayload = { scoutSettings: { item_id: '0x1234567890123456789012345678901234567890123456789012345678901234', network_id: 295 } } try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}